Add Dashboard
This commit is contained in:
28
apps/builder/components/MoreButton.tsx
Normal file
28
apps/builder/components/MoreButton.tsx
Normal file
@ -0,0 +1,28 @@
|
||||
import {
|
||||
ButtonProps,
|
||||
IconButton,
|
||||
Menu,
|
||||
MenuButton,
|
||||
MenuList,
|
||||
} from '@chakra-ui/react'
|
||||
import { MoreVerticalIcon } from 'assets/icons'
|
||||
import { ReactNode } from 'react'
|
||||
|
||||
type Props = { children: ReactNode } & ButtonProps
|
||||
|
||||
export const MoreButton = ({ children, ...props }: Props) => {
|
||||
return (
|
||||
<Menu>
|
||||
<MenuButton
|
||||
as={IconButton}
|
||||
icon={<MoreVerticalIcon />}
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
colorScheme="blue"
|
||||
variant="ghost"
|
||||
size="lg"
|
||||
{...props}
|
||||
/>
|
||||
<MenuList>{children}</MenuList>
|
||||
</Menu>
|
||||
)
|
||||
}
|
Reference in New Issue
Block a user