Skip to content

Commit

Permalink
feat: add portal to menulist rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
karrui committed Jul 19, 2024
1 parent a37ec24 commit 33082d4
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions apps/studio/src/pages/sites/[siteId]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
HStack,
MenuButton,
MenuList,
Portal,
Text,
useDisclosure,
VStack,
Expand Down Expand Up @@ -35,18 +36,22 @@ const SitePage: NextPageWithLayout = () => {
<MenuButton as={Button} size="xs" justifySelf="flex-end">
Create new...
</MenuButton>
<MenuList>
<MenuItem icon={<BiFolder fontSize="1rem" />}>Folder</MenuItem>
<MenuItem
onClick={onPageCreateModalOpen}
icon={<BiFileBlank fontSize="1rem" />}
>
Page
</MenuItem>
<MenuItem icon={<BiData fontSize="1rem" />}>
Collection
</MenuItem>
</MenuList>
<Portal>
<MenuList>
<MenuItem icon={<BiFolder fontSize="1rem" />}>
Folder
</MenuItem>
<MenuItem
onClick={onPageCreateModalOpen}
icon={<BiFileBlank fontSize="1rem" />}
>
Page
</MenuItem>
<MenuItem icon={<BiData fontSize="1rem" />}>
Collection
</MenuItem>
</MenuList>
</Portal>
</Menu>
</HStack>
</VStack>
Expand Down

0 comments on commit 33082d4

Please sign in to comment.