From b9ace994f473252bb9306c6a16edc4120af070d9 Mon Sep 17 00:00:00 2001 From: Aleksandr Shumilov Date: Thu, 5 Sep 2024 19:13:41 +0100 Subject: [PATCH 1/4] Delete icon property --- .changeset/quiet-coins-switch.md | 5 +++++ packages/base/List/src/ListItem/ListItem.tsx | 19 ++----------------- 2 files changed, 7 insertions(+), 17 deletions(-) create mode 100644 .changeset/quiet-coins-switch.md diff --git a/.changeset/quiet-coins-switch.md b/.changeset/quiet-coins-switch.md new file mode 100644 index 0000000000..abd44ba75a --- /dev/null +++ b/.changeset/quiet-coins-switch.md @@ -0,0 +1,5 @@ +--- +'@toptal/picasso-list': major +--- + +- breaking change: `icon` no longer exists in `List.Item` component. If you were using it, please contact the BASE team to add it to component. diff --git a/packages/base/List/src/ListItem/ListItem.tsx b/packages/base/List/src/ListItem/ListItem.tsx index 0983ab54aa..25b5c51eb8 100644 --- a/packages/base/List/src/ListItem/ListItem.tsx +++ b/packages/base/List/src/ListItem/ListItem.tsx @@ -3,7 +3,6 @@ import type { ReactNode } from 'react' import type { BaseProps } from '@toptal/picasso-shared' import { Container } from '@toptal/picasso-container' import { Typography } from '@toptal/picasso-typography' -import { usePropDeprecationWarning } from '@toptal/picasso-utils' import { ArrowLongRight16, Check16 } from '@toptal/picasso-icons' import { twJoin } from '@toptal/picasso-tailwind-merge' @@ -27,10 +26,6 @@ export type Props = BaseProps & { children: ReactNode index?: number variant?: Variant - /** - * @deprecated [FX-4717] if you need a custom icon that is not available on the prop `type`, please contact the BASE team to add it to the theme - **/ - icon?: ReactNode /** Style of the bullet/ordinal */ type?: ListItemType isLastElement?: boolean @@ -38,19 +33,9 @@ export type Props = BaseProps & { export const ListItem = (props: Props) => { const { styleType: parentType } = useListContext() - const { - children, - type, - icon = resolveIcon(type ?? parentType), - 'data-testid': testId, - } = props + const { children, type, 'data-testid': testId } = props - // TODO: [FX-4717] - usePropDeprecationWarning({ - props, - componentName: ListItem.name, - name: 'icon', - }) + const icon = resolveIcon(type ?? parentType) return (
  • Date: Thu, 5 Sep 2024 19:17:33 +0100 Subject: [PATCH 2/4] Fix changeset --- .changeset/quiet-coins-switch.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/quiet-coins-switch.md b/.changeset/quiet-coins-switch.md index abd44ba75a..348aa411b3 100644 --- a/.changeset/quiet-coins-switch.md +++ b/.changeset/quiet-coins-switch.md @@ -2,4 +2,4 @@ '@toptal/picasso-list': major --- -- breaking change: `icon` no longer exists in `List.Item` component. If you were using it, please contact the BASE team to add it to component. +- breaking change: `icon` no longer exists in `List.Item` component. If your project uses it, please contact the BASE Team to confirm that it should be added to `List.Item` component. From 0996dddc407c1fcb546350bc95845cf1bdb720be Mon Sep 17 00:00:00 2001 From: Aleksandr Shumilov Date: Fri, 6 Sep 2024 11:34:22 +0100 Subject: [PATCH 3/4] Fix changeset --- .changeset/quiet-coins-switch.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.changeset/quiet-coins-switch.md b/.changeset/quiet-coins-switch.md index 348aa411b3..ff26d56450 100644 --- a/.changeset/quiet-coins-switch.md +++ b/.changeset/quiet-coins-switch.md @@ -1,5 +1,8 @@ --- '@toptal/picasso-list': major +'@toptal/picasso': patch --- -- breaking change: `icon` no longer exists in `List.Item` component. If your project uses it, please contact the BASE Team to confirm that it should be added to `List.Item` component. +### ListItem + +- breaking change: `icon` property no longer exists. If your project uses it, please contact the BASE Team to confirm that it should be added to the component. From c85f0fbdd972aad841199c78116a4f9bda3c0506 Mon Sep 17 00:00:00 2001 From: Aleksandr Shumilov Date: Fri, 6 Sep 2024 11:35:44 +0100 Subject: [PATCH 4/4] Fix changeset --- .changeset/quiet-coins-switch.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/quiet-coins-switch.md b/.changeset/quiet-coins-switch.md index ff26d56450..1c1390f41f 100644 --- a/.changeset/quiet-coins-switch.md +++ b/.changeset/quiet-coins-switch.md @@ -1,6 +1,6 @@ --- '@toptal/picasso-list': major -'@toptal/picasso': patch +'@toptal/picasso': major --- ### ListItem