npm.io
1.1.0 • Published 11 years ago

rc-accordion

Licence
Version
1.1.0
Deps
2
Vulns
0
Weekly
0

rc-accordion


rc-accordion ui component for react

NPM version build status Test coverage npm download

Development

npm install
npm start

Example

http://localhost:8000/examples/

online example: http://react-component.github.io/accordion/examples/

Feature

  • support ie8,ie8+,chrome,firefox,safari

install

rc-accordion

Usage

var Accordion = require('rc-accordion');
var Panel = Accordion.Panel;
var React = require('react');
var accordion = (
  <Accordion>
    <Panel header="hello">this is panel content</Panel>
    <Panel header="title2">this is panel content2 or other</Panel>
  </Accordion>
);
React.render(accordion, container);

API

Accordion
props:
name type default description
activeKey String The first panel key current active Panel key
onSwitch Function(key) noop called when accordion Panel is changed
Accordion.Panel
props
name type default description
header String or node header content of Panel
key

If no key provide, key value will be the panel index.

Test Case

http://localhost:8000/tests/runner.html?coverage

Coverage

http://localhost:8000/node_modules/rc-server/node_modules/node-jscover/lib/front-end/jscoverage.html?w=http://localhost:8000/tests/runner.html?coverage

License

rc-accordion is released under the MIT license.

Keywords