This commit is contained in:
Stian Fredrik Aune
2021-07-03 23:24:09 +02:00
parent e9bfbfbec7
commit 79fc2a319c
3 changed files with 55 additions and 12 deletions
+12 -2
View File
@@ -1,10 +1,20 @@
@import "../res/colors"
.FormLine
margin: 0.5em 1ch
padding: 0.5em 1ch
width: 100%
&:first-of-type
margin-top: 0
input
input, select
display: block
width: 100%
font: inherit
background-color: $color-background-elevated
color: $color-foreground
border: none
padding: 0.25em 0.5ch
&:focus, &:active
outline: 1px solid $color-foreground-elevated
+2 -2
View File
@@ -115,7 +115,7 @@ export const KelvinColorPicker: React.FC<KelvinColorPickerProps> = ({label, kelv
});
colorPicker.on("input:end", (color: iro.Color) => {
onChange(color.kelvin);
onChange(Math.floor(color.kelvin));
});
return () => {
@@ -130,7 +130,7 @@ export const KelvinColorPicker: React.FC<KelvinColorPickerProps> = ({label, kelv
return (
<FormLine label={label || "KV-farge"}>
<div id={myId} style={{margin: "0 auto"}}/>
<div title={`${kelvin}K`} id={myId} style={{margin: "0 auto"}}/>
</FormLine>
);
}