UNPKG

beta-parity-react

Version:

Beta Parity React Components

64 lines (63 loc) 1.88 kB
import React from 'react'; import './index.css'; import './variables.css'; import { InputProps } from '../BaseInput'; /** * Props for the Textarea component. * * Extends properties from the `span` element and some of the `InputProps`. */ export interface TextareaProps extends React.HTMLAttributes<HTMLTextAreaElement>, Pick<InputProps, 'value' | 'theme' | 'isError' | 'wrapperProps' | 'isClearable' | 'errorMessage' | 'disabled' | 'readOnly'> { /** * Specifies the maximum number of characters that the textarea can contain. * If provided, the component enforces this limit on user input. * * Example: * ```tsx * <Textarea maxLength={200} /> * ``` * * @memberof Textarea */ maxLength?: number; /** * Sets the number of visible text lines in the textarea. * * Example: * ```tsx * <Textarea rows={4} /> * ``` * * @memberof Textarea */ rows?: number; /** * Text displayed on the clear button when `isClearable` is true. * If not provided, a default value may be used. * * Example: * ```tsx * <Textarea isClearable clearBtnText="Remove" /> * ``` * @memberof Textarea */ clearBtnText?: string; /** * Indicates whether the textarea is in an error state. * If true, the component will apply error styles and display an error message if provided. * * Example: * ```tsx * <Textarea isError={true} errorMessage="This field is required." /> * ``` * * @memberof Textarea */ placeholder?: string; } /** * **Parity Textarea** * @see {@link https://beta-parity-react.vercel.app/textarea Parity Textarea} */ export declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>; //# sourceMappingURL=index.d.ts.map