- 引入 Radix Dialog/DropdownMenu/Tabs + CVA - 新增 Button/Input/Dialog/Tabs/Table/Card 等组件(本地拷贝单向同步) - 增加 touch-target(44px) 样式基础
24 行
709 B
TypeScript
24 行
709 B
TypeScript
import * as React from "react";
|
|
import { cn } from "../../lib/utils";
|
|
|
|
export type InputProps = React.InputHTMLAttributes<HTMLInputElement>;
|
|
|
|
export const Input = React.forwardRef<HTMLInputElement, InputProps>(
|
|
({ className, type, ...props }, ref) => {
|
|
return (
|
|
<input
|
|
type={type}
|
|
className={cn(
|
|
"flex h-11 w-full rounded-lg border border-slate-300 bg-white px-3 py-2 text-sm text-slate-900 placeholder:text-slate-400 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-200 disabled:cursor-not-allowed disabled:opacity-50",
|
|
className,
|
|
)}
|
|
ref={ref}
|
|
{...props}
|
|
/>
|
|
);
|
|
},
|
|
);
|
|
|
|
Input.displayName = "Input";
|
|
|