Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | 1x 9x 1x 1x | import React from 'react'
import PropTypes from 'prop-types'
const Expander = (props) => {
return (
<div
className={`rev-Drawer ${props.open ? 'rev-Drawer--open' : ''} ${
props.className
}`}
>
{props.closer}
<div className="rev-Drawer-contents">{props.children}</div>
</div>
)
}
Expander.defaultProps = {
className: '',
}
Expander.propTypes = {
children: PropTypes.node,
className: PropTypes.string,
closer: PropTypes.node,
open: PropTypes.bool,
}
export default Expander
|