TextArea.tsx 818 B

1234567891011121314151617181920212223
  1. import * as React from 'react';
  2. import { cn } from '@/utils/cn';
  3. export interface TextareaProps
  4. extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}
  5. const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
  6. ({ className, ...props }, ref) => {
  7. return (
  8. <textarea
  9. className={cn(
  10. 'flex h-20 w-full rounded-md border border-slate-300 bg-transparent py-2 px-3 text-sm placeholder:text-slate-400 focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:border-slate-700 dark:text-slate-50 dark:focus:ring-slate-400 dark:focus:ring-offset-slate-900',
  11. className,
  12. )}
  13. ref={ref}
  14. {...props}
  15. />
  16. );
  17. },
  18. );
  19. Textarea.displayName = 'Textarea';
  20. export { Textarea };