Permalink
Browse files

Added logic to color the preview <div> with the actual color selected.

  • Loading branch information...
maratbn committed Jul 2, 2018
1 parent eee3928 commit b5c48ade2606d1d8094af2fbde8e10c1c04c83c5
Showing with 4 additions and 1 deletion.
  1. +4 −1 webpack_in/entry.jsx
@@ -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) => {

0 comments on commit b5c48ad

Please sign in to comment.