bugfix: set z-index for dropdown medusajs
This commit is contained in:
parent
a3c683e62f
commit
f21a4251e3
|
|
@ -1,17 +1,19 @@
|
||||||
'use client'
|
'use client'
|
||||||
import { DropdownMenu } from "@medusajs/ui"
|
import { DropdownMenu } from "@medusajs/ui"
|
||||||
import { ChevronDownMini } from "@medusajs/icons"
|
import { ChevronDownMini } from "@medusajs/icons"
|
||||||
export default function DropdownMenuComponent({
|
|
||||||
children,
|
interface DropdownMenuProps {
|
||||||
props,
|
|
||||||
}: {
|
|
||||||
children?: React.ReactNode
|
|
||||||
props?: {
|
|
||||||
className?: string
|
className?: string
|
||||||
"data-testid"?: string
|
"data-testid"?: string
|
||||||
label?: string
|
label?: string
|
||||||
isShowArrow?: boolean
|
isShowArrow?: boolean
|
||||||
}
|
}
|
||||||
|
export default function DropdownMenuComponent({
|
||||||
|
children,
|
||||||
|
props,
|
||||||
|
}: {
|
||||||
|
children?: React.ReactNode
|
||||||
|
props?: DropdownMenuProps
|
||||||
}) {
|
}) {
|
||||||
const itemNodes = Array.isArray(children) ? children : []
|
const itemNodes = Array.isArray(children) ? children : []
|
||||||
|
|
||||||
|
|
@ -26,7 +28,7 @@ export default function DropdownMenuComponent({
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
</DropdownMenu.Trigger>
|
</DropdownMenu.Trigger>
|
||||||
<DropdownMenu.Content>
|
<DropdownMenu.Content className="abc">
|
||||||
{itemNodes.map((item, index) => {
|
{itemNodes.map((item, index) => {
|
||||||
const props = item?.DropdownMenuItems?.props
|
const props = item?.DropdownMenuItems?.props
|
||||||
return props ? <DropdownMenu.Item key={props.label ?? index} className={props.className} data-testid={props["data-testid"]}>{props.label}</DropdownMenu.Item> : null
|
return props ? <DropdownMenu.Item key={props.label ?? index} className={props.className} data-testid={props["data-testid"]}>{props.label}</DropdownMenu.Item> : null
|
||||||
|
|
|
||||||
|
|
@ -110,3 +110,7 @@
|
||||||
@apply text-[32px] leading-[44px] font-semibold;
|
@apply text-[32px] leading-[44px] font-semibold;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[data-radix-popper-content-wrapper]{
|
||||||
|
z-index: 100 !important;
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue