@bizhermit/react-sdk
Version:
React SDK
31 lines (30 loc) • 1.26 kB
TypeScript
import React, { HTMLAttributes } from "react";
import { InputAttributes } from "../../hooks/value";
import { InputHook } from "../../utils/input";
export declare type TextBoxHook = InputHook<string>;
export declare type TextBoxAttributes = HTMLAttributes<HTMLDivElement> & InputAttributes<string> & {
$hook?: TextBoxHook;
$type?: "text" | "email" | "tel" | "url" | "search" | "password";
$autoComplete?: string;
$pattern?: string;
$maxLength?: number;
$minLength?: number;
$required?: boolean;
$resize?: boolean;
$textAlign?: "left" | "center" | "right";
$changing?: (value: string) => boolean | void;
};
declare const TextBox: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & InputAttributes<string, {}> & {
$hook?: TextBoxHook;
$type?: "text" | "email" | "tel" | "url" | "search" | "password";
$autoComplete?: string;
$pattern?: string;
$maxLength?: number;
$minLength?: number;
$required?: boolean;
$resize?: boolean;
$textAlign?: "left" | "center" | "right";
$changing?: (value: string) => boolean | void;
} & React.RefAttributes<HTMLDivElement>>;
export declare const useTextBox: () => TextBoxHook;
export default TextBox;