Skip to content

Commit

Permalink
doc(): Add sidebar story.
Browse files Browse the repository at this point in the history
  • Loading branch information
aidanCQ committed Dec 11, 2024
1 parent 5c0faa4 commit a119eeb
Show file tree
Hide file tree
Showing 5 changed files with 394 additions and 13 deletions.
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
"cmdk": "^0.2.0",
"date-fns": "^3.6.0",
"input-otp": "^1.4.1",
"lucide-react": "^0.298.0",
"lucide-react": "^0.468.0",
"react-day-picker": "^8.10.0",
"react-icons": "^5.3.0",
"react-resizable-panels": "^1.0.5",
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export * from "./shadcn/ui/scroll-area";
export * from "./shadcn/ui/select";
export * from "./shadcn/ui/separator";
export * from "./shadcn/ui/sheet";
export * from './shadcn/ui/sidebar';
export * from "./shadcn/ui/skeleton";
export * from "./shadcn/ui/slider";
export * from "./shadcn/ui/switch";
Expand Down
14 changes: 7 additions & 7 deletions src/shadcn/ui/button.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import * as React from "react"
import { Slot } from "@radix-ui/react-slot"
import { cva, type VariantProps } from "class-variance-authority"

import { cn } from "src/utils"

import { cn } from "src"
const buttonVariants = cva(
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
{
variants: {
variant: {
Expand Down Expand Up @@ -33,13 +33,13 @@ const buttonVariants = cva(
},
}
)

export interface ButtonProps
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
VariantProps<typeof buttonVariants> {
asChild?: boolean
}

const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
({ className, variant, size, asChild = false, ...props }, ref) => {
const Comp = asChild ? Slot : "button"
Expand All @@ -53,5 +53,5 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
}
)
Button.displayName = "Button"

export { Button, buttonVariants }
Loading

0 comments on commit a119eeb

Please sign in to comment.