30 lines
654 B
JavaScript
Raw Normal View History

2020-05-03 01:22:49 -04:00
import { CX } from '../constants'
2020-02-29 10:42:47 -05:00
2020-04-23 02:13:29 -04:00
/**
* Renders a divider component
* @param {bool} [props.isInvisible] - to style the tab bar larger
* @param {bool} [props.isSmall] - if item is active
*/
2020-02-19 18:57:07 -05:00
export default class Divider extends PureComponent {
2020-04-23 02:13:29 -04:00
2020-02-29 10:42:47 -05:00
static propTypes = {
2020-04-23 02:13:29 -04:00
isInvisible: PropTypes.bool,
isSmall: PropTypes.bool,
2020-02-29 10:42:47 -05:00
}
2020-03-05 10:44:17 -05:00
2020-02-19 18:57:07 -05:00
render() {
2020-04-23 02:13:29 -04:00
const { isSmall, isInvisible } = this.props
2020-02-29 10:42:47 -05:00
2020-05-03 01:22:49 -04:00
const classes = CX({
2020-02-29 10:42:47 -05:00
default: 1,
2020-04-23 02:13:29 -04:00
borderBottom1PX: !isInvisible,
2020-04-25 13:00:51 -04:00
borderColorSecondary: !isInvisible,
2020-02-29 10:42:47 -05:00
width100PC: 1,
2020-04-23 02:13:29 -04:00
mb15: !isSmall,
my10: isSmall || isInvisible,
2020-02-29 10:42:47 -05:00
})
2020-04-23 02:13:29 -04:00
return <div className={classes} />
2020-02-19 18:57:07 -05:00
}
2020-04-23 02:13:29 -04:00
2020-02-19 18:57:07 -05:00
}