diff options
| author | 2026-02-22 19:47:13 +0800 | |
|---|---|---|
| committer | 2026-02-22 19:47:13 +0800 | |
| commit | 01b546cc816c4fb6b7389e5122b7802d7e724a2b (patch) | |
| tree | b33e71dc81c60a6678e6fb14f736713bd94bd5dc /packages/ui-new/src/components/ui/input.tsx | |
| parent | 1a103de2f1ef75cd73347953cbe27e14606df871 (diff) | |
| download | DropOut-01b546cc816c4fb6b7389e5122b7802d7e724a2b.tar.gz DropOut-01b546cc816c4fb6b7389e5122b7802d7e724a2b.zip | |
refactor(shadcn): use base lyra instead
Diffstat (limited to 'packages/ui-new/src/components/ui/input.tsx')
| -rw-r--r-- | packages/ui-new/src/components/ui/input.tsx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/packages/ui-new/src/components/ui/input.tsx b/packages/ui-new/src/components/ui/input.tsx index 73ea867..bb0390a 100644 --- a/packages/ui-new/src/components/ui/input.tsx +++ b/packages/ui-new/src/components/ui/input.tsx @@ -1,16 +1,15 @@ +import { Input as InputPrimitive } from "@base-ui/react/input"; import type * as React from "react"; import { cn } from "@/lib/utils"; function Input({ className, type, ...props }: React.ComponentProps<"input">) { return ( - <input + <InputPrimitive type={type} data-slot="input" className={cn( - "file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", - "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", - "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", + "dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 disabled:bg-input/50 dark:disabled:bg-input/80 h-8 rounded-none border bg-transparent px-2.5 py-1 text-xs transition-colors file:h-6 file:text-xs file:font-medium focus-visible:ring-1 aria-invalid:ring-1 md:text-xs file:text-foreground placeholder:text-muted-foreground w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50", className, )} {...props} |