2.4.0 • Published 7 years ago

deku-accordion v2.4.0

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

deku-accordion Build Status

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 component
  • items is the array of accordion elements
  • multiple lets you have several items open at once
  • onClick returns currently active indexes and clicked item

License

MIT © Andreas Gillström

2.4.0

7 years ago

2.3.0

7 years ago

2.2.0

7 years ago

2.1.1

8 years ago

2.1.0

8 years ago

2.0.1

8 years ago

2.0.0

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.0

9 years ago