Skip to content

Commit

Permalink
Limit color input width
Browse files Browse the repository at this point in the history
  • Loading branch information
Rian8337 committed Sep 7, 2023
1 parent f327776 commit dda0ebd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/components/editors/ColorEditor.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
text-align: center;
font: 0.85em Exo-Bold;
}

.color-editor-picker-display {
width: 10%;
}
8 changes: 6 additions & 2 deletions src/components/editors/ColorEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ export default function ColorEditor(props: Props) {
) : null}

<input
className="json-item-editor-input"
className={`json-item-editor-input${
!acceptMultipleColors
? " color-editor-picker-display"
: ""
}`}
type="text"
value={resettable.value}
maxLength={acceptMultipleColors ? undefined : 7}
Expand Down Expand Up @@ -80,7 +84,7 @@ export default function ColorEditor(props: Props) {
/>

<input
className="json-item-editor-input"
className="json-item-editor-input color-editor-picker-display"
type="text"
disabled
value={hexCode}
Expand Down

0 comments on commit dda0ebd

Please sign in to comment.