UNPKG

@primer/react

Version:

An implementation of GitHub's Primer Design System using React

98 lines (97 loc) 2.66 kB
import { WithSlotMarker } from "../utils/types/Slots.js"; import { FormValidationStatus } from "../utils/types/FormValidationStatus.js"; import React, { TextareaHTMLAttributes } from "react"; //#region src/Textarea/Textarea.d.ts type TextareaProps = { /** * Apply inactive visual appearance to the Textarea */ disabled?: boolean; /** * Indicates whether the Textarea validation state */ validationStatus?: FormValidationStatus; /** * Block */ block?: boolean; /** * Allows resizing of the textarea */ resize?: 'none' | 'both' | 'horizontal' | 'vertical'; /** * apply a high contrast color to background */ contrast?: boolean; /** * The className to apply to the wrapper element */ className?: string; /** * The minimum height of the Textarea */ minHeight?: number; /** * The maximum height of the Textarea */ maxHeight?: number; /** * CSS styles to apply to the Textarea */ style?: React.CSSProperties; /** * Optional character limit for the textarea. If provided, a character counter will be displayed below the textarea. * When the limit is exceeded, validation styling will be applied. */ characterLimit?: number; } & TextareaHTMLAttributes<HTMLTextAreaElement>; /** * An accessible, native textarea component that supports validation states. * This component accepts all native HTML <textarea> attributes as props. */ declare const Textarea: React.ForwardRefExoticComponent<{ /** * Apply inactive visual appearance to the Textarea */ disabled?: boolean; /** * Indicates whether the Textarea validation state */ validationStatus?: FormValidationStatus; /** * Block */ block?: boolean; /** * Allows resizing of the textarea */ resize?: "none" | "both" | "horizontal" | "vertical"; /** * apply a high contrast color to background */ contrast?: boolean; /** * The className to apply to the wrapper element */ className?: string; /** * The minimum height of the Textarea */ minHeight?: number; /** * The maximum height of the Textarea */ maxHeight?: number; /** * CSS styles to apply to the Textarea */ style?: React.CSSProperties; /** * Optional character limit for the textarea. If provided, a character counter will be displayed below the textarea. * When the limit is exceeded, validation styling will be applied. */ characterLimit?: number; } & TextareaHTMLAttributes<HTMLTextAreaElement> & React.RefAttributes<HTMLTextAreaElement>>; declare const _default: WithSlotMarker<typeof Textarea>; //#endregion export { TextareaProps, _default as default };