Skip to content

Commit

Permalink
Update shadcn components
Browse files Browse the repository at this point in the history
  • Loading branch information
sabaimran committed Dec 19, 2024
1 parent a4aeb9f commit 7eb15bf
Show file tree
Hide file tree
Showing 10 changed files with 875 additions and 24 deletions.
32 changes: 32 additions & 0 deletions src/interface/web/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,22 @@
.hljs-tag {
/* purposely ignored */
}

--sidebar-background: 0 0% 98%;

--sidebar-foreground: 240 5.3% 26.1%;

--sidebar-primary: 240 5.9% 10%;

--sidebar-primary-foreground: 0 0% 98%;

--sidebar-accent: 240 4.8% 95.9%;

--sidebar-accent-foreground: 240 5.9% 10%;

--sidebar-border: 220 13% 91%;

--sidebar-ring: 217.2 91.2% 59.8%;
}

.dark {
Expand Down Expand Up @@ -324,6 +340,22 @@
.hljs-tag {
/* purposely ignored */
}

--sidebar-background: 240 5.9% 10%;

--sidebar-foreground: 240 4.8% 95.9%;

--sidebar-primary: 224.3 76.3% 48%;

--sidebar-primary-foreground: 0 0% 100%;

--sidebar-accent: 240 3.7% 15.9%;

--sidebar-accent-foreground: 240 4.8% 95.9%;

--sidebar-border: 240 3.7% 15.9%;

--sidebar-ring: 217.2 91.2% 59.8%;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/interface/web/components/ui/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { cva, type VariantProps } 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 gap-2 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 [&_svg]:pointer-events-none [&_svg]:shrink-0",
{
variants: {
variant: {
Expand Down
6 changes: 2 additions & 4 deletions src/interface/web/components/ui/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ import * as React from "react";

import { cn } from "@/lib/utils";

export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {}

const Input = React.forwardRef<HTMLInputElement, InputProps>(
const Input = React.forwardRef<HTMLInputElement, React.ComponentProps<"input">>(
({ className, type, ...props }, ref) => {
return (
<input
type={type}
className={cn(
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
className,
)}
ref={ref}
Expand Down
26 changes: 26 additions & 0 deletions src/interface/web/components/ui/separator.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
"use client";

import * as React from "react";
import * as SeparatorPrimitive from "@radix-ui/react-separator";

import { cn } from "@/lib/utils";

const Separator = React.forwardRef<
React.ElementRef<typeof SeparatorPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>
>(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => (
<SeparatorPrimitive.Root
ref={ref}
decorative={decorative}
orientation={orientation}
className={cn(
"shrink-0 bg-border",
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
className,
)}
{...props}
/>
));
Separator.displayName = SeparatorPrimitive.Root.displayName;

export { Separator };
Loading

0 comments on commit 7eb15bf

Please sign in to comment.