tdesign-react
Version:
TDesign Component for React
15 lines (14 loc) • 441 B
TypeScript
import { TdInputProps } from './type';
export interface UseLengthLimitParams {
value: string;
maxlength: number;
maxcharacter: number;
allowInputOverMax: boolean;
status: TdInputProps['status'];
onValidate: TdInputProps['onValidate'];
}
export default function useLengthLimit(params: UseLengthLimitParams): {
tStatus: string;
limitNumber: string;
getValueByLimitNumber: (inputValue: string) => string;
};