[Color button keep active]
This commit is contained in:
parent
c1a3cb30d5
commit
9dad384580
|
@ -8,13 +8,9 @@ const ParamColor = ({ rendererIndex, paramIndex, value, onChange }) => {
|
||||||
const [displayColorPicker, setDisplay] = useState(false);
|
const [displayColorPicker, setDisplay] = useState(false);
|
||||||
const styles = reactCSS({
|
const styles = reactCSS({
|
||||||
'default': {
|
'default': {
|
||||||
swatch: {
|
btn: {
|
||||||
padding: '5px',
|
borderColor: displayColorPicker ? '#44D7B6' : null,
|
||||||
background: '#fff',
|
color: displayColorPicker ? '#44D7B6' : null
|
||||||
borderRadius: '1px',
|
|
||||||
boxShadow: '0 0 0 1px rgba(0,0,0,.1)',
|
|
||||||
display: 'inline-block',
|
|
||||||
cursor: 'pointer',
|
|
||||||
},
|
},
|
||||||
container: {
|
container: {
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
|
@ -37,7 +33,7 @@ const ParamColor = ({ rendererIndex, paramIndex, value, onChange }) => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={styles.container}>
|
<div style={styles.container}>
|
||||||
<button className="dl-btn" onClick={ () => setDisplay(!displayColorPicker) }>
|
<button className="dl-btn" style={styles.btn} onClick={ () => setDisplay(!displayColorPicker) }>
|
||||||
选择颜色
|
选择颜色
|
||||||
</button>
|
</button>
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue