Ok let's try that again lol
This commit is contained in:
parent
dada8af869
commit
86c5690b4f
@ -364,24 +364,42 @@ export default function () {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const ToolsContent = (
|
const ToolsContent = (
|
||||||
<PopoverContent>
|
<Popover placement="bottom-end">
|
||||||
<PopoverArrow />
|
<PopoverTrigger>
|
||||||
<PopoverCloseButton />
|
<Button ml="8px">
|
||||||
<PopoverHeader>Tools</PopoverHeader>
|
<svg
|
||||||
<PopoverBody>
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
<VStack>
|
width="16"
|
||||||
{pageProps.item_types.map((item) => (
|
height="16"
|
||||||
<Button
|
fill="currentColor"
|
||||||
key={item.value}
|
viewBox="0 0 16 16"
|
||||||
onClick={() => itemModals[item.value].onOpen()}
|
>
|
||||||
w="100%"
|
<path
|
||||||
>
|
fillRule="evenodd"
|
||||||
{item.name}
|
d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"
|
||||||
</Button>
|
/>
|
||||||
))}
|
</svg>
|
||||||
</VStack>
|
</Button>
|
||||||
</PopoverBody>
|
</PopoverTrigger>
|
||||||
</PopoverContent>
|
<PopoverContent>
|
||||||
|
<PopoverArrow />
|
||||||
|
<PopoverCloseButton />
|
||||||
|
<PopoverHeader>Tools</PopoverHeader>
|
||||||
|
<PopoverBody>
|
||||||
|
<VStack>
|
||||||
|
{pageProps.item_types.map((item) => (
|
||||||
|
<Button
|
||||||
|
key={item.value}
|
||||||
|
onClick={() => itemModals[item.value].onOpen()}
|
||||||
|
w="100%"
|
||||||
|
>
|
||||||
|
{item.name}
|
||||||
|
</Button>
|
||||||
|
))}
|
||||||
|
</VStack>
|
||||||
|
</PopoverBody>
|
||||||
|
</PopoverContent>
|
||||||
|
</Popover>
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -434,25 +452,7 @@ export default function () {
|
|||||||
<Box display={isDesktop ? undefined : "none"} ml="16px" w="248px">
|
<Box display={isDesktop ? undefined : "none"} ml="16px" w="248px">
|
||||||
<HStack>
|
<HStack>
|
||||||
{ItemDisplay}
|
{ItemDisplay}
|
||||||
<Popover placement="bottom-end">
|
{ToolsContent}
|
||||||
<PopoverTrigger>
|
|
||||||
<Button ml="8px">
|
|
||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
width="16"
|
|
||||||
height="16"
|
|
||||||
fill="currentColor"
|
|
||||||
viewBox="0 0 16 16"
|
|
||||||
>
|
|
||||||
<path
|
|
||||||
fillRule="evenodd"
|
|
||||||
d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
</Button>
|
|
||||||
</PopoverTrigger>
|
|
||||||
{ToolsContent}
|
|
||||||
</Popover>
|
|
||||||
</HStack>
|
</HStack>
|
||||||
</Box>
|
</Box>
|
||||||
</Flex>
|
</Flex>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user