From 8a29ff092ed06d4b2fbaf0b4d1ad98eeebea3c43 Mon Sep 17 00:00:00 2001 From: Aleksandr Shumilov Date: Fri, 6 Sep 2024 11:59:27 +0100 Subject: [PATCH] [FX-4717] Delete icon property (#4530) --- .changeset/quiet-coins-switch.md | 8 ++++++++ packages/base/List/src/ListItem/ListItem.tsx | 19 ++----------------- 2 files changed, 10 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..1c1390f41f --- /dev/null +++ b/.changeset/quiet-coins-switch.md @@ -0,0 +1,8 @@ +--- +'@toptal/picasso-list': major +'@toptal/picasso': major +--- + +### 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. 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 (