JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q37807F
  • License MIT

Accordion component for real system.

Package Exports

  • @real-system/accordion
  • @real-system/accordion/lib/index.js
  • @real-system/accordion/lib/index.mjs

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.

npm version

Installation

# 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/accordion

Code Example

import { Accordion } from '@real-system/accordion';
import { Disclosure, DisclosureToggle, DisclosureContent } from '@real-system/disclosure';

const MyComponent = () => {
  return (
    // available props
    <Accordion allowMultiple 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>
  )
}