import { TickOpenClose } from "@/assets/icons/TickOpenClose"; import { Box, SxProps, Typography, useTheme } from "@mui/material"; import { useState, ReactNode } from "react"; interface Props { headerText: ReactNode; children: ReactNode; sx?: SxProps; } export const TextAccordion = ({ headerText, children, sx }: Props) => { const theme = useTheme(); const [open, setOpen] = useState(false); return ( setOpen((old) => !old)} > {headerText} {open && children} ); };