Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 12, 2023
1 parent 65ec682 commit 7742e56
Showing 1 changed file with 44 additions and 41 deletions.
85 changes: 44 additions & 41 deletions taxonium_component/src/components/ColorPicker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,56 +25,59 @@ function ColorPicker({ color, setColor }) {
setColor(rgbToList(newColor.rgb));
};

if(!showPicker) {
if (!showPicker) {
return (
<div className="inline-block">
<div className="inline-block">
<div
style={{
padding: "5px",
background: "#fff",
borderRadius: "1px",
boxShadow: "0 0 0 1px rgba(0,0,0,.1)",
display: "inline-block",
cursor: "pointer",
}}
onClick={togglePicker}
>
<div
style={{
padding: '5px',
background: '#fff',
borderRadius: '1px',
boxShadow: '0 0 0 1px rgba(0,0,0,.1)',
display: 'inline-block',
cursor: 'pointer',
width: "36px",
height: "14px",
borderRadius: "2px",
background: `rgba(${rgbColor.r},${rgbColor.g},${rgbColor.b},${
rgbColor.a || 1
})`,
}}
onClick={togglePicker}
>
<div
style={{
width: '36px',
height: '14px',
borderRadius: '2px',
background: `rgba(${rgbColor.r},${rgbColor.g},${rgbColor.b},${rgbColor.a || 1})`,
}}
/>
</div>
/>
</div>
</div>
);

}

return (

<div style={{
position: 'absolute',
zIndex: '2',
}}>
<div
style={{
position: 'fixed',
top: '0px',
right: '0px',
bottom: '0px',
left: '0px',
}}
onClick={handleClose}
/>
<SketchPicker color={rgbColor} onChange={handleColorChange}
presetColors={[]}
/>
</div>
)
<div
style={{
position: "absolute",
zIndex: "2",
}}
>
<div
style={{
position: "fixed",
top: "0px",
right: "0px",
bottom: "0px",
left: "0px",
}}
onClick={handleClose}
/>
<SketchPicker
color={rgbColor}
onChange={handleColorChange}
presetColors={[]}
/>
</div>
);
}


export default ColorPicker;

0 comments on commit 7742e56

Please sign in to comment.