Skip to content

Commit 7c63609

Browse files
committed
Cleanup the UI of color picker element of inspector
1 parent 1babb13 commit 7c63609

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

frontend/src/Editor/Inspector/Elements/Color.jsx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,13 @@ export const Color = ({
3333
</div>
3434
)}
3535

36-
<input
37-
onFocus={() => setShowPicker(true)}
38-
type="text"
39-
onChange={(e) => onChange(param, 'value', e.target.value, paramType)}
40-
className="form-control text-field"
41-
name=""
42-
value={definition.value}
43-
/>
36+
<div className="row mx-1 color-picker-input" onClick={() => setShowPicker(true)}>
37+
<div className="col-auto" style={{width: '40px', height: '30px'}} style={{backgroundColor: definition.value}}>
38+
</div>
39+
<div className="col">
40+
{definition.value}
41+
</div>
42+
</div>
4443
</div>
4544
);
4645
};

frontend/src/_styles/theme.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1571,3 +1571,13 @@ input:focus-visible {
15711571
scrollbar-width: none;
15721572
-ms-overflow-style: none;
15731573
}
1574+
1575+
.sketch-picker {
1576+
position: absolute;
1577+
}
1578+
1579+
1580+
.color-picker-input {
1581+
border: solid 1px rgb(223, 223, 223);
1582+
cursor: pointer;
1583+
}

0 commit comments

Comments
 (0)