1
0
Fork 0
mirror of https://github.com/betagouv/mon-entreprise synced 2025-02-09 05:15:02 +00:00
mon-entreprise/source/components/SatisfactionSmiley.js

30 lines
726 B
JavaScript
Raw Normal View History

2018-07-12 10:09:41 +02:00
import HoverDecorator from 'Components/utils/HoverDecorator'
import withColours from 'Components/utils/withColours'
2018-05-02 17:55:25 +02:00
import React, { Component } from 'react'
import './SatisfactionSmiley.css'
2018-05-02 17:55:25 +02:00
@withColours
@HoverDecorator
export default class SatisfactionSmiley extends Component {
2018-05-02 17:55:25 +02:00
render() {
return (
<button
2018-05-03 15:24:19 +02:00
onClick={() => this.props.onClick(this.props.text)}
2018-05-02 17:55:25 +02: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 17:55:25 +02:00
borderColor: this.props.colours.colour
}
}>
{this.props.text}
</button>
)
}
}