Skip to content

Commit

Permalink
add feature for "Click on the allergies icon should show the allergy"
Browse files Browse the repository at this point in the history
  • Loading branch information
JustTemmie committed Oct 15, 2024
1 parent 623ba92 commit 3b32a61
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion src/components/molecules/event/eventResponses/EventResponses.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ import {
HStack,
ListItem,
Text,
Popover,
PopoverTrigger,
PopoverContent,
PopoverArrow,
PopoverCloseButton,
PopoverHeader,
PopoverBody,
UnorderedList,
} from '@chakra-ui/react';
import ConfirmationBox from 'components/molecules/confirmationBox/ConfirmationBox';
Expand Down Expand Up @@ -350,7 +357,25 @@ const EventResponses: React.FC<{
<Icon type="ban" color="gray"></Icon>
)}
{dietaryRestrictions !== '' && food === true && (
<Icon type="allergies" color="#fdd835 "></Icon>
<Popover>
<PopoverTrigger>
<Button
height={0}
width={0}
border="undefined"
display="normal"
verticalAlign="baseline"
>
<Icon type="allergies" color="#fdd835 " />
</Button>
</PopoverTrigger>
<PopoverContent>
<PopoverArrow />
<PopoverCloseButton />
<PopoverHeader>Allergener</PopoverHeader>
<PopoverBody>{dietaryRestrictions}</PopoverBody>
</PopoverContent>
</Popover>
)}
</div>
);
Expand Down

0 comments on commit 3b32a61

Please sign in to comment.