From 0ec8de94228025feebb183b81298051696fef553 Mon Sep 17 00:00:00 2001 From: Thomas Desmond <24610108+thomas-desmond@users.noreply.github.com> Date: Fri, 2 Feb 2024 10:18:25 -0800 Subject: [PATCH] Change Popver to a Modal to fix mobile layout issues --- src/components/ui/HexagonItem/HexagonItem.tsx | 214 +++++++++--------- 1 file changed, 108 insertions(+), 106 deletions(-) diff --git a/src/components/ui/HexagonItem/HexagonItem.tsx b/src/components/ui/HexagonItem/HexagonItem.tsx index 968a5a6e..7bf93a56 100644 --- a/src/components/ui/HexagonItem/HexagonItem.tsx +++ b/src/components/ui/HexagonItem/HexagonItem.tsx @@ -1,21 +1,21 @@ import { Box, Button, - Heading, + Modal, + ModalOverlay, + ModalContent, + ModalBody, + ModalHeader, + ModalCloseButton, + ModalFooter, Image, Link, - Popover, - PopoverArrow, - PopoverBody, - PopoverCloseButton, - PopoverContent, - PopoverTrigger, + useDisclosure, Show, - Text, } from '@chakra-ui/react'; import { Products } from 'models/Config'; import { TargetProduct } from 'models/OutcomeConditions'; -import { FC, useState } from 'react'; +import { FC } from 'react'; interface HexagonItemProps { product: TargetProduct; @@ -23,7 +23,7 @@ interface HexagonItemProps { } export const HexagonItem: FC = ({ product, active = false }) => { - const [isOpen, setIsOpen] = useState(false); + const { isOpen, onOpen, onClose } = useDisclosure() const productDetail = Products.find((p) => p.product === product); @@ -32,106 +32,108 @@ export const HexagonItem: FC = ({ product, active = false }) = } return ( - setIsOpen(false)}> - - - - - - - - - {productDetail.name} - - + + {productDetail.name} + + + {productDetail.name} + + + + + + + {productDetail.name} + + {productDetail.description} - - - + + - - - - + + + + ); };