File size: 817 Bytes
8a37e0a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
import type { MenuItemProps } from '@invoke-ai/ui-library';
import { Flex, MenuItem, Tooltip } from '@invoke-ai/ui-library';
import type { ReactNode } from 'react';
type Props = MenuItemProps & {
tooltip?: ReactNode;
icon: ReactNode;
};
export const IconMenuItem = ({ tooltip, icon, ...props }: Props) => {
return (
<Tooltip label={tooltip} placement="top" gutter={12}>
<MenuItem
display="flex"
alignItems="center"
justifyContent="center"
w="min-content"
aspectRatio="1"
borderRadius="base"
{...props}
>
{icon}
</MenuItem>
</Tooltip>
);
};
export const IconMenuItemGroup = ({ children }: { children: ReactNode }) => {
return (
<Flex gap={2} justifyContent="space-between">
{children}
</Flex>
);
};
|