flockstr/components/ui/textarea.tsx

25 lines
759 B
TypeScript
Raw Permalink Normal View History

2023-10-24 13:37:15 -04:00
import * as React from "react";
2023-10-13 09:23:11 -04:00
2023-10-24 13:37:15 -04:00
import { cn } from "@/lib/utils";
2023-10-13 09:23:11 -04:00
export interface TextareaProps
extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}
const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
({ className, ...props }, ref) => {
return (
<textarea
className={cn(
2023-10-24 16:21:27 -04:00
"flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 max-sm:text-[16px]",
2023-10-24 13:37:15 -04:00
className,
2023-10-13 09:23:11 -04:00
)}
ref={ref}
{...props}
/>
2023-10-24 13:37:15 -04:00
);
},
);
Textarea.displayName = "Textarea";
2023-10-13 09:23:11 -04:00
2023-10-24 13:37:15 -04:00
export { Textarea };