@abgov/react-components
Version:
Government of Alberta - UI components for React
49 lines (48 loc) • 1.62 kB
TypeScript
import { GoabTextAreaCountBy, GoabTextAreaOnChangeDetail, GoabTextAreaOnKeyPressDetail, GoabTextAreaOnBlurDetail, Margins } from '@abgov/ui-components-common';
import { JSX } from 'react';
interface WCProps extends Margins {
ref: React.Ref<HTMLTextAreaElement>;
name: string;
value?: string;
placeholder?: string;
rows?: number;
error?: string;
readOnly?: string;
disabled?: string;
width?: string;
maxwidth?: string;
arialabel?: string;
countby?: GoabTextAreaCountBy;
maxcount?: number;
autocomplete?: string;
testid?: string;
}
declare module "react" {
namespace JSX {
interface IntrinsicElements {
"goa-textarea": WCProps & React.HTMLAttributes<HTMLElement>;
}
}
}
export interface GoabTextAreaProps extends Margins {
name: string;
value?: string;
id?: string;
placeholder?: string;
rows?: number;
error?: boolean;
readOnly?: boolean;
disabled?: boolean;
width?: string;
maxWidth?: string;
testId?: string;
ariaLabel?: string;
countBy?: GoabTextAreaCountBy;
maxCount?: number;
autoComplete?: string;
onChange?: (event: GoabTextAreaOnChangeDetail) => void;
onKeyPress?: (event: GoabTextAreaOnKeyPressDetail) => void;
onBlur?: (event: GoabTextAreaOnBlurDetail) => void;
}
export declare function GoabTextArea({ name, value, placeholder, rows, readOnly, disabled, countBy, maxCount, width, maxWidth, testId, error, ariaLabel, mt, mr, mb, ml, autoComplete, onChange, onKeyPress, onBlur, }: GoabTextAreaProps): JSX.Element;
export default GoabTextArea;