@cfxjs/react-ui
Version:
Modern and minimalist React UI library.
24 lines (23 loc) • 965 B
TypeScript
import React, { TextareaHTMLAttributes } from 'react';
import { useTextareaHandle } from '../input/use-input-handle';
import { InputColors, InputVariantTypes } from '../utils/prop-types';
interface Props extends TextareaHTMLAttributes<HTMLTextAreaElement> {
value: string;
defaultValue: string;
counter?: boolean;
variant?: InputVariantTypes;
placeholder?: string;
color?: InputColors;
width?: string;
minHeight?: string;
className?: string;
}
declare type NativeAttrs = Omit<React.TextareaHTMLAttributes<any>, keyof Props>;
export declare type TextareaProps = React.PropsWithChildren<Props & NativeAttrs>;
declare const TextareaComponent: React.ForwardRefExoticComponent<Props & Pick<React.TextareaHTMLAttributes<any>, never> & {
children?: React.ReactNode;
} & React.RefAttributes<HTMLTextAreaElement>> & {
useTextareaHandle: typeof useTextareaHandle;
};
export { useTextareaHandle };
export default TextareaComponent;