import React, { useState, useEffect } from 'react'; import { Container, Label, ContentWrapper, Content } from './styled'; type Props = { label: React.ReactNode; children?: React.ReactNode; isActive?: boolean; showBottomBorder?: boolean; }; const Collapse: React.FC = ({ label = '', children = '', isActive = false, showBottomBorder = false, }: Props) => { const [isCollapse, setCollapse] = useState(true); useEffect(() => { setCollapse(!isActive); }, [isActive]); return ( {children ? ( {children} ) : null} ); }; export default Collapse;