From 3a49233ec32d5d07e390b58c5f3820b3034b2fca Mon Sep 17 00:00:00 2001 From: Hasan Yahya Date: Sat, 16 Nov 2024 16:04:13 +0500 Subject: [PATCH] refactor: Update button and slider components to remove focus ring for improved accessibility and visual clarity; add tint-tracker-vite dependency --- src/components/ui/button.jsx | 2 +- src/components/ui/slider.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/ui/button.jsx b/src/components/ui/button.jsx index 9bdf65b..220670e 100644 --- a/src/components/ui/button.jsx +++ b/src/components/ui/button.jsx @@ -5,7 +5,7 @@ import { cva } from "class-variance-authority"; import { cn } from "@/lib/utils" const buttonVariants = cva( - "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium 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", + "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0 disabled:pointer-events-none disabled:opacity-50", { variants: { variant: { diff --git a/src/components/ui/slider.jsx b/src/components/ui/slider.jsx index 79ee6a5..e13788e 100644 --- a/src/components/ui/slider.jsx +++ b/src/components/ui/slider.jsx @@ -15,7 +15,7 @@ const Slider = React.forwardRef(({ className, ...props }, ref) => ( + 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-0 focus-visible:ring-ring focus-visible:ring-offset-0 disabled:pointer-events-none disabled:opacity-50" /> )) Slider.displayName = SliderPrimitive.Root.displayName