fix: Add isIconStatic prop item to allow the icons to be always rendered statically ignoring hover behaviour (#4676)
Fix #4653 --------- Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
This commit is contained in:
@ -20,6 +20,7 @@ export type MenuItemProps = {
|
||||
accent?: MenuItemAccent;
|
||||
text: string;
|
||||
iconButtons?: MenuItemIconButton[];
|
||||
isIconDisplayedOnHoverOnly?: boolean;
|
||||
isTooltipOpen?: boolean;
|
||||
className?: string;
|
||||
testId?: string;
|
||||
@ -32,6 +33,7 @@ export const MenuItem = ({
|
||||
text,
|
||||
iconButtons,
|
||||
isTooltipOpen,
|
||||
isIconDisplayedOnHoverOnly = true,
|
||||
className,
|
||||
testId,
|
||||
onClick,
|
||||
@ -53,6 +55,7 @@ export const MenuItem = ({
|
||||
className={className}
|
||||
accent={accent}
|
||||
isMenuOpen={!!isTooltipOpen}
|
||||
isIconDisplayedOnHoverOnly={isIconDisplayedOnHoverOnly}
|
||||
>
|
||||
<StyledMenuItemLeftContent>
|
||||
<MenuItemLeftContent LeftIcon={LeftIcon ?? undefined} text={text} />
|
||||
|
||||
Reference in New Issue
Block a user