1
0
Fork 0
mirror of https://github.com/betagouv/mon-entreprise synced 2025-02-09 01:45:03 +00:00
mon-entreprise/source/components/SatisfactionSmiley.js
Johan Girod 0e028cc843 wip
2018-08-04 12:11:34 +02:00

29 lines
726 B
JavaScript

import HoverDecorator from 'Components/utils/HoverDecorator'
import withColours from 'Components/utils/withColours'
import React, { Component } from 'react'
import './SatisfactionSmiley.css'
@withColours
@HoverDecorator
export default class SatisfactionSmiley extends Component {
render() {
return (
<button
onClick={() => this.props.onClick(this.props.text)}
className="satisfaction-smiley"
style={
this.props.hover
? {
background: this.props.colours.colour,
color: 'white',
borderColor: 'transparent'
}
: {
color: this.props.colours.colour,
borderColor: this.props.colours.colour
}
}>
{this.props.text}
</button>
)
}
}