@magic-modules/accordion
@magic-module that vertically shows/hides tabs in an accordion
install:
npm install --save-exact @magic-modules/accordion
usage:
// in any component view
export const View = () => Accordion({
// state key of this accordion, eg state.accordions.stateKey = int id of shown submenu
key: 'stateKey', // required
// array of items to show
// title OR content are optional, but not both.
items: [ // required
{ title: 'item 1 title', content: 'item 1 content' },
{ title: 'item 2 title', content: ['item 2 content ', img('/img/logo.png'), ' can also include html tags']}
],
// render horizontal tabs
horizontal: true, // optional,
// object with additional css
style: { // optional
maxWidth: '40%',
},
})
changelog
0.0.1
first commit
0.0.2
use @magic npm packages instead of github for installs
0.0.3
- require node 13.5.0
- @magic > 0.0.53 has new way of passing state
0.0.4
bump required node version to 14.2.0
0.0.5
use li for accordion items update dev dependencies
0.0.6
bump required node version to 14.15.4
0.0.7
update dependencies
0.0.8 - unreleased
...