console: fix quick add dropdown of add operation from allow-list

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8548
GitOrigin-RevId: 3b90caf1c7d0a36176a2708609b976f833f1be77
This commit is contained in:
Varun Choudhary 2023-03-30 11:56:04 +05:30 committed by hasura-bot
parent e317c1a53f
commit a7053fd9b5
2 changed files with 4 additions and 1 deletions

View File

@ -134,6 +134,7 @@ export const QuickAdd = (props: QuickAddProps) => {
className: 'z-[101]',
},
}}
zIndex="z-[102]"
items={[
[...quickOperations, ...graphiqlQueries].map(operation => (
<div

View File

@ -53,12 +53,14 @@ export interface DropdownMenuProps {
portal?: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>;
};
items: React.ReactNode[][];
zIndex?: string;
}
export const DropdownMenu: React.FC<DropdownMenuProps> = ({
children,
items,
options,
zIndex = 'z-[101]',
}) => (
<DropdownMenuPrimitive.Root {...options?.root}>
<DropdownMenuTrigger {...options?.trigger}>{children}</DropdownMenuTrigger>
@ -66,7 +68,7 @@ export const DropdownMenu: React.FC<DropdownMenuProps> = ({
<DropdownMenuPrimitive.Content
align="start"
{...options?.content}
className="z-[101]"
className={zIndex}
>
<div className="origin-top-left absolute left-0 z-10 mt-xs w-max rounded shadow-md bg-white ring-1 ring-gray-300 divide-y divide-gray-300 focus:outline-none">
{items.map((group, groupIndex) => (