35 lines
699 B
JavaScript
Raw Normal View History

2020-02-19 18:57:07 -05:00
import Text from './text'
export default class Badge extends PureComponent {
static propTypes = {
children: PropTypes.string,
2020-02-20 19:57:29 -05:00
description: PropTypes.string,
2020-02-19 18:57:07 -05:00
}
state = {
hovering: false,
}
handleOnMouseEnter = () => {
this.setState({ hovering: true })
}
handleOnMouseLeave = () => {
this.setState({ hovering: false })
}
render() {
2020-02-20 19:57:29 -05:00
const { children, description } = this.props
2020-02-19 18:57:07 -05:00
const { hovering } = this.state
return (
2020-02-20 19:57:29 -05:00
<Text
color='white'
size='extraSmall'
className={[_s.backgroundColorBrand, _s.paddingHorizontal5PX, _s.lineHeight125, _s.radiusSmall].join(' ')}
>
{children}
</Text>
2020-02-19 18:57:07 -05:00
)
}
}