Package Exports
- @real-system/accordion
- @real-system/accordion/lib/index.esm.js
- @real-system/accordion/lib/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@real-system/accordion) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@real-system/accordion
Accordion component for real system.
Usage
# install peer dependencies
# npm
$ npm install react react-dom @real-system/a11y-library @real-system/styled-library @real-system/disclosure @real-system/utils-library
# yarn
$ yarn add react react-dom @real-system/a11y-library @real-system/styled-library @real-system/disclosure @real-system/utils-library
# install accordion
# npm
$ npm install @real-system/accordion
# yarn
$ yarn add @real-system/accordionCode Example
import { Accordion } from '@real-system/accordion';
import { Disclosure, DisclosureToggle, DisclosureContent } from '@real-system/disclosure';
const MyComponent = () => {
return (
// available props
<Accordion allowMultiple allowToggle contained defaultExpanded={{ 1: true, 2: true, 3: true }}>
<Disclosure>
<DisclosureToggle>Accordion Item 1</DisclosureToggle>
<DisclosureContent>Some content to expand and collapse</DisclosureContent>
</Disclosure>
<Disclosure>
<DisclosureToggle>Accordion Item 2</DisclosureToggle>
<DisclosureContent>Some content to expand and collapse</DisclosureContent>
</Disclosure>
<Disclosure>
<DisclosureToggle>Accordion Item 3</DisclosureToggle>
<DisclosureContent>Some content to expand and collapse</DisclosureContent>
</Disclosure>
</Accordion>
)
}