README
apeman-react-accordion
apeman react package for accordion components.
Installation
$ npm install apeman-react-accordion --save
Demo
Live demo is hosted on GitHub Pages.
Usage
'use strict'
import React from 'react'
import {
ApAccordion,
ApAccordionHeader,
ApAccordionBody,
ApAccordionStyle
}from 'apeman-react-accordion'
const ExampleComponent = React.createClass({
getInitialState () {
return {
open: false
}
},
onToggle () {
const s = this
s.setState({
open: !s.state.open
})
},
render () {
const s = this
let {state} = s
return (
<div>
<ApAccordionStyle/>
<ApAccordion open={ state.open }>
<ApAccordionHeader onToggle={ s.onToggle }>
<a>This is Header text.</a>
</ApAccordionHeader>
<ApAccordionBody>
<span>This is Body text</span>
</ApAccordionBody>
</ApAccordion>
</div>
)
}
})
Components
ApAccordionArrow
Props
Name | Type | Default | Description |
---|---|---|---|
icon | string | 'fa fa-chevron-down' |
ApAccordionBody
Props
Name | Type | Default | Description |
---|
ApAccordionHeader
Props
Name | Type | Default | Description |
---|---|---|---|
onToggle | func | null | |
busyDuration | number | 500 |
ApAccordionStyle
Props
Name | Type | Default | Description |
---|
ApAccordion
Props
Name | Type | Default | Description |
---|---|---|---|
open | bool |
License
This software is released under the MIT License.