mon-entreprise/source/components/SatisfactionSmiley.js

30 lines
726 B
JavaScript
Raw Normal View History

2018-07-12 08:09:41 +00:00
import HoverDecorator from 'Components/utils/HoverDecorator'
import withColours from 'Components/utils/withColours'
2018-05-02 15:55:25 +00:00
import React, { Component } from 'react'
import './SatisfactionSmiley.css'
2018-05-02 15:55:25 +00:00
@withColours
@HoverDecorator
export default class SatisfactionSmiley extends Component {
2018-05-02 15:55:25 +00:00
render() {
return (
<button
2018-05-03 13:24:19 +00:00
onClick={() => this.props.onClick(this.props.text)}
2018-05-02 15:55:25 +00:00
className="satisfaction-smiley"
style={
this.props.hover
? {
background: this.props.colours.colour,
color: 'white',
borderColor: 'transparent'
}
: {
color: this.props.colours.colour,
2018-05-02 15:55:25 +00:00
borderColor: this.props.colours.colour
}
}>
{this.props.text}
</button>
)
}
}