import React from 'react' import { AnimatePresence, motion } from 'framer-motion' export const Accordion = (props) => { const { i, expanded, setExpanded, openUpwards } = props const isOpen = i === expanded const header = ( setExpanded(isOpen ? false : i)} className='accordion-header' > {props.header} ) return ( <> {!openUpwards && header} <> {isOpen && ( {props.content} )} {openUpwards && header} ) } Accordion.defaultProps = { openUpwards: false } const Content = (props) =>
{props.children}
export const ContentWrapper = (props) => ( )