Skip to content

Commit

Permalink
added IconSizeHelper top Popover trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus-wishes committed May 6, 2024
1 parent 12e95d1 commit 366b802
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
8 changes: 4 additions & 4 deletions library/src/components/DropdownMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -454,15 +454,15 @@ const Trigger = forwardRef<HTMLButtonElement, TriggerProps>(
{...rest}
>
{children}
<div
className={`h-full hidden items-center w-6 ${
<IconSizeHelper
className={`h-full hidden items-center justify-center w-6 ${
hideChevron ? "" : "group-data-[state=open]:flex"
}`}
>
<ChevronUpIcon label="" size="medium" />
</div>
</IconSizeHelper>
<IconSizeHelper
className={`h-full hidden items-center w-6 ${
className={`h-full hidden items-center justify-center w-6 ${
hideChevron ? "" : "group-data-[state=closed]:flex"
}`}
>
Expand Down
13 changes: 7 additions & 6 deletions library/src/components/Popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { twMerge } from "tailwind-merge"
import { getPortal } from "../utils"
import { Button, type ButtonProps } from "./Button"
import { overlayBaseStyle } from "./styleHelper"
import { IconSizeHelper } from "./IconSizeHelper"

const portalDivId = "uikts-popover" as const

Expand Down Expand Up @@ -38,20 +39,20 @@ const Trigger = forwardRef<HTMLButtonElement, TriggerProps>(
{...rest}
>
{children}
<div
className={`h-full hidden items-center w-6 ${
<IconSizeHelper
className={`h-full hidden items-center justify-center w-6 ${
hideChevron ? "" : "group-data-[state=open]:flex"
}`}
>
<ChevronUpIcon label="" size="medium" />
</div>
<div
className={`h-full hidden items-center w-6 ${
</IconSizeHelper>
<IconSizeHelper
className={`h-full items-center justify-center hidden w-6 ${
hideChevron ? "" : "group-data-[state=closed]:flex"
}`}
>
<ChevronDownIcon label="" size="medium" />
</div>
</IconSizeHelper>
</Button>
)
},
Expand Down

0 comments on commit 366b802

Please sign in to comment.