Skip to content

Commit

Permalink
fix: select item custom class passing (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
Natallia-Harshunova authored Sep 9, 2024
1 parent 1b9fd01 commit 814f158
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions packages/ui-kit/src/Select/components/SelectItem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@ export const SelectItem = forwardRef(
{ className, highlighted, selected, item, title, itemProps, showSelectedIcon = true, showEntryIcon = false },
ref,
) => {
const dynamicClasses = cn({
[style.selectItem]: true,
[style.highlighted]: !item.disabled && highlighted,
[style.selected]: !item.disabled && selected,
[style.disabled]: item.disabled,
[style.hasDivider]: item.hasDivider,
const dynamicClasses = cn(
{
[style.selectItem]: true,
[style.highlighted]: !item.disabled && highlighted,
[style.selected]: !item.disabled && selected,
[style.disabled]: item.disabled,
[style.hasDivider]: item.hasDivider,
},
className,
});
);

return (
<li className={dynamicClasses} ref={ref} {...(!item.disabled ? itemProps : {})}>
Expand Down

0 comments on commit 814f158

Please sign in to comment.