UNPKG

ultra-design

Version:
53 lines (52 loc) 1.6 kB
import React from 'react'; declare const resizeTypes: readonly ["none", "both", "horizontal", "vertical", "initial", "inherit"]; export interface Props { /** * @description.zh-CN 默认值 * @description.en-US default value */ defaultValue?: string; /** * @description.zh-CN 值 * @description.en-US value */ value?: string; /** * @description.zh-CN 占位符 * @description.en-US placeholder */ placeholder?: string; /** * @description.zh-CN 禁用状态 * @description.en-US disabled status */ disabled?: boolean; /** * @description.zh-CN 是否只读 * @description.en-US readolny */ readOnly?: boolean; /** * @description.zh-CN 输入或时的回调 * @description.en-US callback of textarea */ onChange?: (value: string, e: React.ChangeEvent<HTMLTextAreaElement>) => void; /** * @description.zh-CN 输入框标题 * @description.en-US input label */ label?: React.ReactNode; /** * @description.zh-CN CSS resize 属性 * @description.en-US CSS resize attribute */ resize?: typeof resizeTypes[number]; } declare type NativeAttrs = React.TextareaHTMLAttributes<HTMLTextAreaElement>; export declare type TextareaProps = Props & NativeAttrs; declare const defaultProps: { resize: string; }; export declare type MergedTextareaProps = typeof defaultProps & Props; declare const _default: React.ForwardRefExoticComponent<Props & NativeAttrs & React.RefAttributes<HTMLTextAreaElement>>; export default _default;