From eaf70a9221adddc99c945f8701e7d066ccaaf3a9 Mon Sep 17 00:00:00 2001 From: Peng Jie Date: Wed, 17 Jun 2020 10:33:39 +0800 Subject: [PATCH] refactor(color-picker): drag the pointer smoothly (#1036) * refactor(color-picker): drag the pointer smoothly * keep Color picker as Functional componentgd Co-authored-by: Mike Fix --- components/ColorPicker.js | 67 ++++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 32 deletions(-) diff --git a/components/ColorPicker.js b/components/ColorPicker.js index 4d4d30e..b87f5fc 100644 --- a/components/ColorPicker.js +++ b/components/ColorPicker.js @@ -9,38 +9,41 @@ const pickerStyle = { margin: '0 auto 1px', } -const ColorPicker = ({ onChange = () => {}, color, presets, style, disableAlpha }) => ( - - - - -) + :global(.sketch-picker > div:nth-child(3) > div > div > input) { + width: 100% !important + box-shadow: none + outline: none + border-radius: 2px + background: ${COLORS.DARK_GRAY} + color: #fff !important + } -export default ColorPicker + :global(.sketch-picker > div:nth-child(2) > div:nth-child(1) > div:nth-child(2), .sketch-picker > div:nth-child(2) > div:nth-child(2)) { + background: #fff + } + `} + + + ) +}