Skip to content

Commit

Permalink
fix(Theme): select styling (#2606)
Browse files Browse the repository at this point in the history
Fixes rendering of select in theme builder
  • Loading branch information
eirikbacker authored Oct 11, 2024
1 parent 181ea10 commit b1fe777
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
5 changes: 1 addition & 4 deletions apps/theme/components/ColorPicker/ColorPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,7 @@ export const ColorPicker = ({
className={cl(classes.container, 'ds-focus')}
onClick={() => handleClick()}
>
<div
style={{ backgroundColor: color }}
className={classes.color}
></div>
<div style={{ backgroundColor: color }} className={classes.color} />
<div className={classes.input}>{color}</div>
</button>
</div>
Expand Down
6 changes: 6 additions & 0 deletions apps/theme/components/ThemeToolbar/ThemeToolbar.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,9 @@
.contrastSelect {
width: 150px;
}

.select {
display: flex;
flex-direction: column;
gap: var(--ds-spacing-2);
}
5 changes: 2 additions & 3 deletions apps/theme/components/ThemeToolbar/ThemeToolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export const ThemeToolbar = ({
}}
/>

<div className={classes.dropdown}>
<div className={classes.select}>
<Label htmlFor='select-contrast'>Kontrastnivå</Label>
<Select
id='select-contrast'
Expand All @@ -121,12 +121,11 @@ export const ThemeToolbar = ({
<Select.Option value='aaa'>AAA (WIP)</Select.Option>
</Select>
</div>
<div className={classes.borderRadii}>
<div className={classes.select}>
<Label htmlFor='select-border-radius'>Border radius</Label>
<Select
id='select-border-radius'
size='md'
className={classes.borderRadiiSelect}
value={borderRadius}
onChange={(e) => onBorderRadiusChanged(e.target.value)}
style={{
Expand Down

0 comments on commit b1fe777

Please sign in to comment.