Skip to content

Add "open" props

Compare
Choose a tag to compare
@scriptex scriptex released this 01 Sep 09:12
· 597 commits to master since this release

In this release:

  1. The <Accordion /> component receives a new open prop (number - a zero based index) which is optional and specifies which item should be open on initial load.
  2. The <Panel /> component receives a new open prop (boolean) which is optional and specifies if the <Panel /> should be open on initial load.
  3. The already deprecated findDomNode from react-dom is no longer used. Instead the useRef API is used.
  4. The code linter is switched to ESLint from the already deprecated TSLint.
  5. The documentation was updated to reflect all props, their types and defaults.
  6. A better demo is available and can be found on a specific domain. Check the repository for more info.
  7. Some (probably( BREAKING CHANGES have been introduced:
  • the AccordionItem interface was renamed to AccordionPanel
  • there are no default exports anymore. One needs to import using import { Panel, Accordion } from 'react-accordion-ts'
  • the transition duration in the (optional) stylesheet has been reduced down to 300 milliseconds from 350