import Accordion from 'react-bootstrap/Accordion' import AccordionContext from 'react-bootstrap/AccordionContext' import { useAccordionButton } from 'react-bootstrap/AccordionButton' import ArrowRight from '../svgs/arrow-right-s-fill.svg' import ArrowDown from '../svgs/arrow-down-s-fill.svg' import { useContext } from 'react' function ContextAwareToggle ({ children, headerColor = 'var(--theme-grey)', eventKey }) { const { activeEventKey } = useContext(AccordionContext) const decoratedOnClick = useAccordionButton(eventKey) const isCurrentEventKey = activeEventKey === eventKey return (
{isCurrentEventKey ? : } {children}
) } export default function AccordianItem ({ header, body, headerColor = 'var(--theme-grey)', show }) { return (
{header}
{body}
) }