fix: Icon size stroke in MenuItem (#1545)

* icon size change

* stroke prop

* lint fix

* lint refix

* wrong repo change
This commit is contained in:
Aditya Pimpalkar 2023-09-12 20:54:01 +01:00 committed by GitHub
parent e23b8ecca1
commit cdd7890bef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,6 @@
import { FunctionComponent } from 'react';
export type IconComponent = FunctionComponent<{ size?: number }>;
export type IconComponent = FunctionComponent<{
size?: number;
stroke?: number;
}>;

View File

@ -18,7 +18,9 @@ export function MenuItemLeftContent({ LeftIcon, text }: OwnProps) {
return (
<StyledMenuItemLeftContent>
{LeftIcon && <LeftIcon size={theme.icon.size.md} />}
{LeftIcon && (
<LeftIcon size={theme.icon.size.md} stroke={theme.icon.stroke.sm} />
)}
<StyledMenuItemLabel hasLeftIcon={!!LeftIcon}>
<OverflowingTextWithTooltip text={text} />
</StyledMenuItemLabel>