mirror of
https://github.com/maputnik/editor.git
synced 2025-12-25 15:40:00 +00:00
Added color swatch to color field.
This commit is contained in:
@@ -81,8 +81,13 @@ class ColorField extends React.Component {
|
||||
/>
|
||||
</div>
|
||||
|
||||
var swatchStyle = {
|
||||
"background-color": this.props.value
|
||||
};
|
||||
|
||||
return <div className="maputnik-color-wrapper">
|
||||
{this.state.pickerOpened && picker}
|
||||
<div className="maputnik-color-swatch" style={swatchStyle}></div>
|
||||
<input
|
||||
className="maputnik-color"
|
||||
ref="colorInput"
|
||||
|
||||
Reference in New Issue
Block a user