Skip to content

Commit 1f39dab

Browse files
Felix Beceicjtomic-croz
Felix Beceic
authored andcommitted
#251 Fix DropdownMenu not registering icon props properly
1 parent c176ae9 commit 1f39dab

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

libs/menu/src/DropdownMenu.tsx

+13-3
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,19 @@ function DropdownMenu({
131131
{ [tokens.Icon.color.light]: iconColor === "light" },
132132
);
133133

134-
const iconProps = { className: iconClassName, size: 3 };
135-
const finalOpenExpanderIcon = useIcon("openExpander", openExpanderIcon, iconProps);
136-
const finalCloseExpanderIcon = useIcon("closeExpander", closeExpanderIcon, iconProps);
134+
const openIconProps = {
135+
className: openExpanderIcon?.props.className || iconClassName,
136+
size: openExpanderIcon?.props.size || 3,
137+
...openExpanderIcon?.props,
138+
};
139+
const finalOpenExpanderIcon = useIcon("openExpander", openExpanderIcon, openIconProps);
140+
141+
const closeIconProps = {
142+
className: closeExpanderIcon?.props.className || iconClassName,
143+
size: closeExpanderIcon?.props.size || 3,
144+
...closeExpanderIcon?.props,
145+
};
146+
const finalCloseExpanderIcon = useIcon("closeExpander", closeExpanderIcon, closeIconProps);
137147

138148
const responsiveIcon = (
139149
<div>

0 commit comments

Comments
 (0)