@synergycodes/axiom
Version:
A React library for creating node-based UIs and diagram-driven applications. Perfect for React Flow users, providing ready-to-use node templates and components that work seamlessly with React Flow's ecosystem.
62 lines (61 loc) • 1.72 kB
TypeScript
import { default as React } from 'react';
import { ItemSize } from '../../shared/types/item-size';
export type TextAreaProps = {
/**
* Controlled value of the textarea
*/
value?: string;
/**
* Initial value of the textarea
*/
defaultValue?: string;
/**
* Placeholder text for the textarea
*/
placeholder?: string;
/**
* Size of the textarea
*/
size?: ItemSize;
/**
* Maximum number of rows the textarea can expand to
*/
maxRows?: number;
/**
* Minimum number of rows the textarea can expand to
*/
minRows?: number;
/**
* Whether the textarea is disabled
*/
disabled?: boolean;
/**
* Whether the textarea has an error
*/
error?: boolean;
/**
* Callback function to handle change in textarea value
*/
onChange?: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;
/**
* Callback function to handle click
*/
onClick?: (event: React.MouseEvent<HTMLTextAreaElement>) => void;
/**
* Function called when the input loses focus.
* The event parameter may be undefined.
*/
onBlur?: (event?: React.FocusEvent) => void;
/**
* Custom class name for the textarea
*/
className?: string;
/**
* Enables or disables browser spell checking
*/
spellCheck?: boolean;
};
/**
* Component for displaying a textarea with customizable size, rows, and error state
*/
export declare function TextArea({ value, defaultValue, placeholder, size, maxRows, minRows, disabled, error, onChange, onClick, onBlur, className, spellCheck, ...props }: TextAreaProps): import("react/jsx-runtime").JSX.Element;