File size: 705 Bytes
660842c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import { ComponentProps } from "react";

import { Slider } from "@/components/ui/slider";
import { Label } from "@/components/ui/label";
import { cn } from "@/lib/utils";

export function SliderField({
  label,
  className = "",
  labelClassName = "",
  sliderClassName = "",
  ...props
}: ComponentProps<typeof Slider> & {
  label?: string;
  className?: string;
  labelClassName?: string;
  sliderClassName?: string;
}) {
  return (
    <div className={cn(
      `flex flex-row space-x-2 items-center`,
      className
      )}>
      {label && <Label className={cn("text-xs text-zinc-400 w-1/3", labelClassName)}>{label}</Label>}
      <Slider {...props} className={sliderClassName} />
    </div>
  )
}