diff --git a/packages/toybox_c1200_ui/lib/Knob.tsx b/packages/toybox_c1200_ui/lib/Knob.tsx index 2bd6fdef..8c9f82bf 100644 --- a/packages/toybox_c1200_ui/lib/Knob.tsx +++ b/packages/toybox_c1200_ui/lib/Knob.tsx @@ -3,6 +3,7 @@ import { useState } from "react"; import { KnobHeadless } from "react-knob-headless"; import { mapTo01Linear } from "@dsp-ts/math"; import { KnobBaseThumb } from "./KnobBaseThumb"; +import useTheme from "@himalaya-ui/core/esm/use-theme"; type KnobBaseThumbProps = React.ComponentProps; type KnobDecorativeProps = Pick & { @@ -10,6 +11,7 @@ type KnobDecorativeProps = Pick & { }; export function KnobDecorative({ valueDefault }: KnobDecorativeProps) { + const theme = useTheme(); const [valueRaw, setValueRaw] = useState(valueDefault); const value01 = mapTo01Linear(valueRaw, valueMin, valueMax); return ( @@ -20,6 +22,14 @@ export function KnobDecorative({ valueDefault }: KnobDecorativeProps) { width: "4rem", height: "4rem", position: "relative", + background: + "linear-gradient(white, white) padding-box, linear-gradient(to bottom," + + theme.palette.accents_5 + + "B5," + + theme.palette.background + + ") border-box", + borderRadius: "56em", + border: "3px solid transparent", }} aria-label={""} valueMin={valueMin} diff --git a/packages/toybox_c1200_ui/lib/KnobBaseThumb.tsx b/packages/toybox_c1200_ui/lib/KnobBaseThumb.tsx index 7dc72d07..73919c1a 100644 --- a/packages/toybox_c1200_ui/lib/KnobBaseThumb.tsx +++ b/packages/toybox_c1200_ui/lib/KnobBaseThumb.tsx @@ -10,6 +10,7 @@ export function KnobBaseThumb({ value01 }: KnobBaseThumbProps) { const angleMin = -145; const angleMax = 145; const angle = mapFrom01Linear(value01, angleMin, angleMax); + return (