MCPcopy Create free account
hub / github.com/dailydotdev/apps / Slider

Function Slider

packages/shared/src/components/fields/Slider.tsx:23–50  ·  view source on GitHub ↗
({ className, thumbLabel, compact, ...props }: SliderProps)

Source from the content-addressed store, hash-verified

21}
22
23const Slider = ({ className, thumbLabel, compact, ...props }: SliderProps) => {
24 return (
25 <SliderPrimitive.Root
26 {...props}
27 className={classNames(
28 'relative flex touch-none select-none items-center',
29 compact ? 'h-4 min-w-0' : 'h-5 min-w-48',
30 className,
31 )}
32 >
33 <SliderPrimitive.Track
34 className={classNames(
35 'relative flex-1 rounded-max bg-surface-disabled',
36 compact ? 'h-1' : 'h-2',
37 )}
38 >
39 <SliderPrimitive.Range className="absolute h-full rounded-max bg-brand-default" />
40 </SliderPrimitive.Track>
41 <SliderPrimitive.Thumb
42 aria-label={thumbLabel}
43 className={classNames(
44 'block rounded-max border-accent-cabbage-default bg-accent-cabbage-subtlest',
45 compact ? 'h-3.5 w-3.5 border-2' : 'h-7 w-7 border-4',
46 )}
47 />
48 </SliderPrimitive.Root>
49 );
50};
51
52export { Slider };

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected