UNPKG

684 BTypeScriptView Raw
1import * as React from 'react';
2type TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement>;
3type Style = Omit<NonNullable<TextareaProps['style']>, 'maxHeight' | 'minHeight'> & {
4 height?: number;
5};
6export type TextareaHeightChangeMeta = {
7 rowHeight: number;
8};
9export interface TextareaAutosizeProps extends Omit<TextareaProps, 'style'> {
10 maxRows?: number;
11 minRows?: number;
12 onHeightChange?: (height: number, meta: TextareaHeightChangeMeta) => void;
13 cacheMeasurements?: boolean;
14 style?: Style;
15}
16declare const _default: React.ForwardRefExoticComponent<TextareaAutosizeProps & React.RefAttributes<HTMLTextAreaElement>>;
17export default _default;