@littlespoon/accordion
v1.1.6
Published
Little Spoon accordion
Downloads
1,017
Readme
@littlespoon/accordion
Install
Yarn:
yarn add @littlespoon/accordion
npm:
npm install @littlespoon/accordion --save
Usage
import {
Accordion,
AccordionItem,
AccordionSummary,
AccordionDetails,
} from '@littlespoon/accordion'
Render Accordion:
<Accordion>
<AccordionItem>
<AccordionSummary />
<AccordionDetails />
</AccordionItem>
</Accordion>
Render Accordion with props:
<Accordion>
<AccordionItem>
<AccordionSummary isExpanded={true} />
<AccordionDetails isExpanded={true} />
</AccordionItem>
</Accordion>
Render Multiple Accordions with props:
<Accordion>
<AccordionItem>
<AccordionSummary />
<AccordionDetails />
</AccordionItem>
<AccordionItem>
<AccordionSummary />
<AccordionDetails />
</AccordionItem>
<AccordionItem>
<AccordionSummary isExpanded={true} />
<AccordionDetails isExpanded={true} />
</AccordionItem>
</Accordion>