From 9dad384580df43f38d15a7faefb03984b518f142 Mon Sep 17 00:00:00 2001 From: CPunisher <1343316114@qq.com> Date: Fri, 15 May 2020 17:23:01 +0800 Subject: [PATCH] [Color button keep active] --- src/components/param/ParamColor.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/components/param/ParamColor.js b/src/components/param/ParamColor.js index aa3da96..e8ecd08 100644 --- a/src/components/param/ParamColor.js +++ b/src/components/param/ParamColor.js @@ -8,13 +8,9 @@ const ParamColor = ({ rendererIndex, paramIndex, value, onChange }) => { const [displayColorPicker, setDisplay] = useState(false); const styles = reactCSS({ 'default': { - swatch: { - padding: '5px', - background: '#fff', - borderRadius: '1px', - boxShadow: '0 0 0 1px rgba(0,0,0,.1)', - display: 'inline-block', - cursor: 'pointer', + btn: { + borderColor: displayColorPicker ? '#44D7B6' : null, + color: displayColorPicker ? '#44D7B6' : null }, container: { position: 'relative', @@ -37,7 +33,7 @@ const ParamColor = ({ rendererIndex, paramIndex, value, onChange }) => { return (