Skip to content

Commit

Permalink
feat(): Add color change on hover for TabsTrigger #3
Browse files Browse the repository at this point in the history
feat(): Add color change on hover for TabsTrigger
  • Loading branch information
Codar97 authored Apr 3, 2024
2 parents 9471fa2 + c1f9ce6 commit ffa841e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/shadcn/ui/tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const TabsTrigger = React.forwardRef<
<TabsPrimitive.Trigger
ref={ref}
className={cn(
"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",
"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow data-[state=inactive]:hover:brightness-50 data-[state=inactive]:dark:hover:brightness-150",
className
)}
{...props}
Expand Down
6 changes: 5 additions & 1 deletion stories/shadcn/tabs.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta } from "@storybook/react";
import type { Meta, StoryObj } from "@storybook/react";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "src";

const meta: Meta<typeof Tabs> = {
Expand All @@ -19,3 +19,7 @@ const meta: Meta<typeof Tabs> = {
};

export default meta;

export const Default: StoryObj<typeof Tabs> = {
args: {},
};

0 comments on commit ffa841e

Please sign in to comment.