Add "open" props
In this release:
- The
<Accordion />component receives a newopenprop (number - a zero based index) which is optional and specifies which item should be open on initial load. - The
<Panel />component receives a newopenprop (boolean) which is optional and specifies if the<Panel />should be open on initial load. - The already deprecated
findDomNodefromreact-domis no longer used. Instead theuseRefAPI is used. - The code linter is switched to ESLint from the already deprecated TSLint.
- The documentation was updated to reflect all props, their types and defaults.
- A better demo is available and can be found on a specific domain. Check the repository for more info.
- Some (probably( BREAKING CHANGES have been introduced:
- the
AccordionIteminterface was renamed toAccordionPanel - 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