Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions site/src/components/Slider/Slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,23 @@ export const Slider = React.forwardRef<
<SliderPrimitive.Root
ref={ref}
className={cn(
"relative flex w-full items-center h-1.5",
"relative flex w-full items-center h-3", // Increased height from h-1.5 to h-3 for better touch targets
className,
"touch-none select-none",
)}
{...props}
>
<SliderPrimitive.Track className="relative h-2 w-full grow overflow-hidden rounded-full bg-surface-secondary data-[disabled]:opacity-40">
<SliderPrimitive.Track className="relative h-3 w-full grow overflow-hidden rounded-full bg-surface-secondary data-[disabled]:opacity-40">
<SliderPrimitive.Range className="absolute h-full bg-content-primary" />
</SliderPrimitive.Track>
<SliderPrimitive.Thumb
className="block h-4 w-4 rounded-full border border-solid border-surface-invert-secondary bg-surface-primary shadow transition-colors
className="block h-5 w-5 rounded-full border border-solid border-surface-invert-secondary bg-surface-primary shadow transition-colors
focus-visible:outline-none hover:border-content-primary
focus-visible:ring-0 focus-visible:ring-content-primary focus-visible:ring-offset-surface-primary
disabled:pointer-events-none data-[disabled]:opacity-100 data-[disabled]:border-border"
/>
<SliderPrimitive.Thumb
className="block h-4 w-4 rounded-full border border-solid border-surface-invert-secondary bg-surface-primary shadow transition-colors
className="block h-5 w-5 rounded-full border border-solid border-surface-invert-secondary bg-surface-primary shadow transition-colors
focus-visible:outline-none hover:border-content-primary
focus-visible:ring-0 focus-visible:ring-content-primary focus-visible:ring-offset-surface-primary
disabled:pointer-events-none data-[disabled]:opacity-100 data-[disabled]:border-border"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ const ParameterField: FC<ParameterFieldProps> = ({

case "slider":
return (
<div className="flex flex-row items-baseline gap-3">
<div className="flex flex-row items-center gap-4">
<Slider
className="mt-2"
defaultValue={[
Expand All @@ -308,7 +308,9 @@ const ParameterField: FC<ParameterFieldProps> = ({
max={parameter.validations[0]?.validation_max ?? 100}
disabled={disabled}
/>
<span className="w-4 font-medium">{parameter.value.value}</span>
<span className="w-8 text-center font-medium bg-surface-secondary rounded px-2 py-1">
{parameter.value.value}
</span>
</div>
);

Expand Down Expand Up @@ -632,4 +634,4 @@ const parameterError = (
/{min}|{max}|{value}/g,
(match) => r.get(match) || "",
);
};
};
Loading