import { CSSProperties } from "react"; import { cn } from "renderer/helpers/css-class.helpers"; type Props = Readonly<{ mode: "horizontal" | "vertical"; color: string; className?: string; nbSteps: number; step: number; }> export function LaserSlider({mode, color, className, nbSteps, step}: Props) { const sliderStyle = ((): CSSProperties => { if(mode === "vertical"){ return { transform: `translate(0, ${step * 100}%)`, height: `calc(100% / ${nbSteps})`, width: "100%" } } return { transform: `translate(${step * 100}%, 0)`, width: `calc(100% / ${nbSteps})`, height: "100%" } })(); return (
) }