@bizhermit/react-sdk
Version:
React SDK
37 lines (36 loc) • 1.44 kB
TypeScript
import React, { HTMLAttributes } from "react";
import { InputAttributes } from "../../hooks/value";
import { InputHook } from "../../utils/input";
export declare type NumericBoxHook = InputHook<number>;
export declare type NumericBoxAttributes = HTMLAttributes<HTMLDivElement> & InputAttributes<number> & {
$hook?: NumericBoxHook;
$textAlign?: "left" | "center" | "right";
$max?: number;
$min?: number;
$sign?: "only-positive" | "only-negative";
$float?: number;
$notThousandSeparator?: boolean;
$incrementInterval?: number;
$preventKeydownIncrement?: boolean;
$hideButtons?: boolean;
$required?: boolean;
$resize?: boolean;
$changing?: (value: string) => boolean | void;
};
declare const NumericBox: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & InputAttributes<number, {}> & {
$hook?: NumericBoxHook;
$textAlign?: "left" | "center" | "right";
$max?: number;
$min?: number;
$sign?: "only-positive" | "only-negative";
$float?: number;
$notThousandSeparator?: boolean;
$incrementInterval?: number;
$preventKeydownIncrement?: boolean;
$hideButtons?: boolean;
$required?: boolean;
$resize?: boolean;
$changing?: (value: string) => boolean | void;
} & React.RefAttributes<HTMLDivElement>>;
export declare const useNumericBox: () => NumericBoxHook;
export default NumericBox;