35 lines
702 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-03-03 22:45:16 -05:00
const { hovering } = this.state // : todo : tooltip
2020-02-19 18:57:07 -05:00
return (
2020-02-20 19:57:29 -05:00
<Text
color='white'
size='extraSmall'
2020-03-11 19:56:18 -04:00
className={[_s.backgroundColorBrand, _s.px5, _s.lineHeight125, _s.radiusSmall].join(' ')}
2020-02-20 19:57:29 -05:00
>
{children}
</Text>
2020-02-19 18:57:07 -05:00
)
}
}