Add "open" props
In this release:
- The
<Accordion />
component receives a newopen
prop (number - a zero based index) which is optional and specifies which item should be open on initial load. - The
<Panel />
component receives a newopen
prop (boolean) which is optional and specifies if the<Panel />
should be open on initial load. - The already deprecated
findDomNode
fromreact-dom
is no longer used. Instead theuseRef
API 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
AccordionItem
interface 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