@snowball-tech/fractal
Version:
Fractal's (Snowball's design system) React component library based on RadixUI and PandaCSS
32 lines (29 loc) • 975 B
TypeScript
import { ReactNode, ChangeEvent } from 'react';
import { TextareaAutosizeProps } from 'react-textarea-autosize';
interface TextareaProps extends Omit<TextareaAutosizeProps, 'onChange' | 'onHeightChange'> {
autoFocus?: boolean;
defaultValue?: number | string;
description?: ReactNode;
disabled?: boolean;
error?: Error | ReactNode;
fullWidth?: boolean;
icon?: ReactNode;
iconButtonLabel?: string;
iconDisabled?: boolean;
id?: string;
label?: ReactNode;
labelElement?: keyof HTMLElementTagNameMap;
maxRows?: number;
minRows?: number;
name?: string;
placeholder?: string;
readOnly?: boolean;
required?: boolean;
selectOnFocus?: boolean;
success?: ReactNode;
value?: number | string;
onChange?: (event: ChangeEvent<HTMLTextAreaElement>, newValue: string) => void;
onHeightChange?: TextareaAutosizeProps['onHeightChange'];
onIconClick?: () => void;
}
export type { TextareaProps };