UNPKG

@etsoo/materialui

Version:

TypeScript Material-UI Implementation

56 lines (55 loc) 1.26 kB
import React from "react"; import { InputFieldProps } from "./InputField"; import { BoxProps } from "@mui/material/Box"; /** * Integer input field props */ export type IntInputFieldProps = Omit<InputFieldProps, "type" | "inputProps" | "value" | "defaultValue"> & { /** * Minimum value */ min?: number; /** * Maximum value */ max?: number; /** * Step value */ step?: number; /** * Display minus and plus buttons */ buttons?: boolean; /** * End symbol */ endSymbol?: string; /** * Start (Currency) symbol */ symbol?: string; /** * Value */ value?: number; /** * Input field style */ inputStyle?: React.CSSProperties; /** * On value change callback * @param value Value * @param source Source value * @param init Initial action */ onValueChange?: (value: number | undefined, source: unknown, init: boolean) => number | boolean | null | void; /** * Box props */ boxProps?: BoxProps; }; /** * Integer input field (controlled) */ export declare const IntInputField: React.ForwardRefExoticComponent<Omit<IntInputFieldProps, "ref"> & React.RefAttributes<HTMLDivElement>>;