gab-social/app/javascript/gabsocial/components/divider.js

27 lines
529 B
JavaScript
Raw Normal View History

2020-02-29 15:42:47 +00:00
import classnames from 'classnames/bind'
const cx = classnames.bind(_s)
2020-02-19 23:57:07 +00:00
export default class Divider extends PureComponent {
2020-02-29 15:42:47 +00:00
static propTypes = {
2020-03-05 15:44:17 +00:00
small: PropTypes.bool,
invisible: PropTypes.bool,
2020-02-29 15:42:47 +00:00
}
2020-03-05 15:44:17 +00:00
2020-02-19 23:57:07 +00:00
render() {
2020-03-05 15:44:17 +00:00
const { small, invisible } = this.props
2020-02-29 15:42:47 +00:00
const classes = cx({
default: 1,
2020-03-05 15:44:17 +00:00
borderBottom1PX: !invisible,
borderColorSecondary2: !invisible,
2020-02-29 15:42:47 +00:00
width100PC: 1,
2020-03-11 23:56:18 +00:00
mb15: !small,
my10: small || invisible,
2020-02-29 15:42:47 +00:00
})
2020-02-19 23:57:07 +00:00
return (
2020-02-29 15:42:47 +00:00
<div className={classes} />
2020-02-19 23:57:07 +00:00
)
}
}