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
+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>
);
}