@saleor/macaw-ui
Version:
Saleor's UI component library
29 lines (27 loc) • 956 B
TypeScript
import { LabelVariants } from '../BaseInput';
import { ReactNode } from 'react';
export type TextareaValue = string | number | readonly string[] | undefined;
type ChangeHandler = (event: React.ChangeEvent<HTMLTextAreaElement>) => void;
export declare const useStateEvents: (value: TextareaValue, changeHandler?: ChangeHandler) => {
handlers: {
onFocus: () => void;
onBlur: () => void;
onChange: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;
};
value: TextareaValue;
active: boolean;
typed: boolean;
};
type TextareaWrapperProps = LabelVariants & {
id?: string;
label?: ReactNode;
className?: string;
error?: boolean;
children: ReactNode;
endAdornment?: ReactNode;
};
export declare const TextareaWrapper: {
({ children, id, typed, active, disabled, size, label, error, className, endAdornment, }: TextareaWrapperProps): JSX.Element;
displayName: string;
};
export {};