import React from 'react';
import { Textarea } from '@cloudflare/component-textarea';
import { Base, BaseProps } from './Base';

export type TextareaProps<ValueType> = BaseProps<
  Omit<React.ComponentProps<typeof Textarea>, 'placeholder'>,
  ValueType
>;

export default function FormTextarea<ValueType>(
  props: TextareaProps<ValueType>
) {
  return (
    <Base<TextareaProps<ValueType>, ValueType>
      // @ts-ignore
      Component={Textarea}
      {...props}
    />
  );
}
