Skip to content

Commit 3e654c3

Browse files
authored
Merge pull request #22 from Shreyanshi210205/shreyanshi_slider
feat: update StrokeControl and Slider components with consistent back…
2 parents 3c9d07a + 537781a commit 3e654c3

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

client/src/components/StrokeControl.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,19 @@ export const StrokeControl = ({ strokeWidth, onStrokeWidthChange }) => {
1515
min={1}
1616
max={20}
1717
step={1}
18-
className="w-full"
18+
className="w-full border-2 border-border bg=black"
1919
/>
2020
<div className="flex justify-center pt-2">
21+
<div className="relative h-10 flex items-center justify-center">
2122
<div
22-
className="rounded-full bg-foreground transition-all duration-200"
23+
className="rounded-full bg-black transition-all duration-200"
2324
style={{
2425
width: `${strokeWidth * 2}px`,
2526
height: `${strokeWidth * 2}px`,
2627
}}
2728
/>
2829
</div>
30+
</div>
2931
</div>
3032
</div>
3133
</div>

client/src/components/ui/Slider.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ const Slider = React.forwardRef((props, ref) => {
88
return (
99
<SliderPrimitive.Root
1010
ref={ref}
11-
className={cn("relative flex w-full touch-none select-none items-center", className)}
11+
className={cn("relative flex w-full touch-none select-none items-center bg-black", className)}
1212
{...rest}
1313
>
14-
<SliderPrimitive.Track className="relative h-2 w-full grow overflow-hidden rounded-full bg-secondary">
14+
<SliderPrimitive.Track className="relative h-1 w-full grow overflow-hidden rounded-full bg-secondary">
1515
<SliderPrimitive.Range className="absolute h-full bg-primary" />
1616
</SliderPrimitive.Track>
17-
<SliderPrimitive.Thumb className="block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" />
17+
<SliderPrimitive.Thumb className="block h-5 w-5 rounded-full border-2 border-primary bg-black ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" />
1818
</SliderPrimitive.Root>
1919
);
2020
});

0 commit comments

Comments
 (0)