Skip to content

Commit

Permalink
fix dropdown's duplicate icon
Browse files Browse the repository at this point in the history
  • Loading branch information
talentlessguy committed Aug 28, 2024
1 parent 9ac888f commit 8e8af93
Show file tree
Hide file tree
Showing 3 changed files with 803 additions and 215 deletions.
29 changes: 13 additions & 16 deletions components/src/components/molecules/Dropdown/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,16 +178,18 @@ const MenuButton = React.forwardRef<HTMLElement, BoxProps & MenuButtonProps>(
transitionTimingFunction="$ease-in-out"
width="$full"
>
{$icon && (
<Box
as={$icon}
color={$color ? `$${$color}` : '$textPrimary'}
flexBasis="$4"
flexGrow="0"
flexShrink="0"
wh="$4"
/>
)}
{$icon
? (
<Box
as={$icon}
color={$color ? `$${$color}` : '$textPrimary'}
flexBasis="$4"
flexGrow="0"
flexShrink="0"
wh="$4"
/>
)
: null}
{children}
{$showIndicator && (
<Box
Expand Down Expand Up @@ -273,12 +275,7 @@ const DropdownMenu = React.forwardRef<HTMLDivElement, DropdownMenuProps>(
setIsOpen(false)
},
as: href ? 'a' : 'button',
children: (
<>
{icon}
{label}
</>
),
children: label,
href,
} as const

Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"eslint-config-next": "^13.5.6",
"gray-matter": "^4.0.3",
"lodash": "^4.17.21",
"next": "14.2.5",
"next": "14.2.7",
"next-mdx-remote": "^3.0.6",
"nookies": "^2.5.2",
"prism-react-renderer": "^1.2.1",
Expand Down
Loading

0 comments on commit 8e8af93

Please sign in to comment.