From 47414b20b2daeaa6fb5c7b4a38d4d0fce2458990 Mon Sep 17 00:00:00 2001 From: Natallia Harshunova Date: Fri, 6 Sep 2024 08:51:32 +0200 Subject: [PATCH] fix: select item custom class passing --- .../src/Select/components/SelectItem/index.tsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/packages/ui-kit/src/Select/components/SelectItem/index.tsx b/packages/ui-kit/src/Select/components/SelectItem/index.tsx index d1074540..6f4f3c6e 100644 --- a/packages/ui-kit/src/Select/components/SelectItem/index.tsx +++ b/packages/ui-kit/src/Select/components/SelectItem/index.tsx @@ -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 (