@mtburdon/react-collapsible
v1.0.7
Published
React collapsible component
Downloads
1
Readme
@mtburdon/react-collapsible
React collapsible component
Install
npm install --save @mtburdon/react-collapsible
Usage
import React, { Component } from 'react'
import {
Collapsible,
CollapsibleHead,
CollapsibleBody
} from '@mtburdon/react-collapsible'
import '@mtburdon/react-collapsible/dist/index.css'
class Example extends Component {
render() {
return (
<Collapsible>
<CollapsibleHead>Toggle me</CollapsibleHead>
<CollapsibleBody>Some content</CollapsibleBody>
</Collapsible>
)
}
}
Available CSS custom properties
--collapsible-margin
--collapsible-head-background
--collapsible-head-color
--collapsible-head-padding
--collapsible-body-background
--collapsible-body-color
--collapsible-body-padding
License
MIT © martinburdon