deku-accordion
v2.4.0
Published
accordion component for deku
Downloads
13
Readme
deku-accordion
Accordion component for deku
Install
$ npm install --save deku-accordion
Usage
import Accordion from 'deku-accordion';
export function 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/>
);
}
Attributes
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