Progress
This commit is contained in:
33
app/javascript/gabsocial/components/badge.js
Normal file
33
app/javascript/gabsocial/components/badge.js
Normal file
@@ -0,0 +1,33 @@
|
||||
import Text from './text'
|
||||
|
||||
export default class Badge extends PureComponent {
|
||||
static propTypes = {
|
||||
children: PropTypes.string,
|
||||
popover: PropTypes.string,
|
||||
}
|
||||
|
||||
state = {
|
||||
hovering: false,
|
||||
}
|
||||
|
||||
handleOnMouseEnter = () => {
|
||||
this.setState({ hovering: true })
|
||||
}
|
||||
|
||||
handleOnMouseLeave = () => {
|
||||
this.setState({ hovering: false })
|
||||
}
|
||||
|
||||
render() {
|
||||
const { children, popover } = this.props
|
||||
const { hovering } = this.state
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Text color='secondary' size='small' className={_s.marginVertical5PX}>
|
||||
{children}
|
||||
</Text>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user