Awesome
deku-accordion
Accordion component for deku
Install
$ npm install deku-accordion
Usage
import Accordion from 'deku-accordion';
export const render = () => {
const items = [{
content: <div>Content 1</div>,
heading: 'Heading 1'
}, {
content: <div>Content 2</div>,
heading: 'Heading 2',
active: true
}, {
content: <div>Content 3</div>,
heading: 'Heading 3',
active: true
}];
return (
<Accordion items={items} multiple/>
);
}
Props
class
adds classes to the componentitems
is the array of accordion elementsmultiple
lets you have several items open at onceonClick
returns currently active indexes and clicked item
License
MIT © Andreas Gillström