2025-10-16 10:00:22 +08:00
|
|
|
import * as React from "react";
|
|
|
|
|
import { cn } from "@/lib/utils";
|
|
|
|
|
|
|
|
|
|
export type TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement>;
|
|
|
|
|
|
|
|
|
|
const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
|
|
|
|
|
({ className, ...props }, ref) => {
|
|
|
|
|
return (
|
|
|
|
|
<textarea
|
|
|
|
|
className={cn(
|
2025-10-22 13:31:17 +08:00
|
|
|
"flex min-h-[80px] w-full rounded-md border border-border-default bg-background px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-blue-500/20 dark:focus:ring-blue-400/20 disabled:cursor-not-allowed disabled:opacity-50",
|
2025-10-16 12:13:51 +08:00
|
|
|
className,
|
2025-10-16 10:00:22 +08:00
|
|
|
)}
|
2025-11-10 14:35:55 +08:00
|
|
|
autoComplete="off"
|
|
|
|
|
autoCorrect="off"
|
|
|
|
|
autoCapitalize="none"
|
|
|
|
|
spellCheck={false}
|
2025-10-16 10:00:22 +08:00
|
|
|
ref={ref}
|
|
|
|
|
{...props}
|
|
|
|
|
/>
|
|
|
|
|
);
|
2025-10-16 12:13:51 +08:00
|
|
|
},
|
2025-10-16 10:00:22 +08:00
|
|
|
);
|
|
|
|
|
Textarea.displayName = "Textarea";
|
|
|
|
|
|
|
|
|
|
export { Textarea };
|