Skip to content

Commit

Permalink
trailing visual on autocomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
broccolinisoup committed Jun 13, 2023
1 parent e60671c commit 4393680
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/deprecated/ActionList/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export interface ItemProps extends SxProp {
/**
* Icon or text positioned after `Item` text.
*/
trailingVisual?: React.FunctionComponent<React.PropsWithChildren<IconProps>> | React.ReactNode
trailingVisual?: React.FunctionComponent<React.PropsWithChildren<IconProps>>

/**
* Style variations associated with various `Item` types.
Expand Down Expand Up @@ -466,7 +466,7 @@ export const Item = React.forwardRef((itemProps, ref) => {
{TrailingVisual ? (
<TrailingContent variant={variant} disabled={disabled}>
{/* @ts-ignore how to check the type of Icons ? */}
{typeof TrailingVisual === 'object' ? <TrailingVisual /> : TrailingVisual}
<TrailingVisual />
</TrailingContent>
) : TrailingIcon || trailingText ? (
<TrailingContent variant={variant} disabled={disabled}>
Expand Down

0 comments on commit 4393680

Please sign in to comment.