Skip to content

Commit

Permalink
Added logic to color the preview <div> with the actual color selected.
Browse files Browse the repository at this point in the history
  • Loading branch information
maratbn committed Aug 5, 2018
1 parent eee3928 commit b5c48ad
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion webpack_in/entry.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -303,12 +303,15 @@ class ColorSelector extends React.Component {
}

render() {
const { color } = this.state;

return (
<div style={ objStyleCommon }>
<div style={{ margin: '1em auto',
width: '70%',
height: '3em',
border: 'solid 2px black' }} />
border: 'solid 2px black',
backgroundColor: `rgb(${color.r}, ${color.g}, ${color.b})`}} />
<div style={{ marginTop: '-1em'}}>
<ColorComponentEntry label="R" value={ this.state.color.r } onChangeValue={
(value) => {
Expand Down

0 comments on commit b5c48ad

Please sign in to comment.