mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-28 18:21:17 +01:00
Added color swatch to color field.
This commit is contained in:
parent
bbf26a3f38
commit
6095f871ed
2 changed files with 11 additions and 1 deletions
|
@ -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"
|
||||
|
|
|
@ -30,7 +30,12 @@
|
|||
|
||||
.maputnik-color-wrapper {
|
||||
position: relative;
|
||||
display: inline;
|
||||
@include flex-row;
|
||||
}
|
||||
|
||||
.maputnik-color-swatch {
|
||||
height: 26px;
|
||||
width: 3px;
|
||||
}
|
||||
|
||||
// ARRAY
|
||||
|
|
Loading…
Reference in a new issue