Skip to content

Commit

Permalink
Delete icon property
Browse files Browse the repository at this point in the history
  • Loading branch information
sashuk committed Sep 5, 2024
1 parent ffb935b commit b9ace99
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 17 deletions.
5 changes: 5 additions & 0 deletions .changeset/quiet-coins-switch.md
Original file line number Diff line number Diff line change
@@ -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.
19 changes: 2 additions & 17 deletions packages/base/List/src/ListItem/ListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -27,30 +26,16 @@ 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
}

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 (
<li
Expand Down

0 comments on commit b9ace99

Please sign in to comment.