@etsoo/materialui
Version:
TypeScript Material-UI Implementation
40 lines (39 loc) • 1.02 kB
TypeScript
import { TextFieldProps } from "@mui/material/TextField";
type ReactIMask = typeof import("react-imask", { with: { "resolution-mode": "import" } }).useIMask;
type RIOpts = Parameters<ReactIMask>[0];
type RIReturns = ReturnType<ReactIMask>;
type RIMaskRef = RIReturns["maskRef"]["current"];
type RIMValue = RIReturns["value"];
/**
* Mask input props
*/
export type MaskInputProps = TextFieldProps & {
/**
* Mask props
*/
mask: RIOpts;
/**
* Accept hanlder
*/
onAccept?: (value: RIMValue, maskRef: RIMaskRef, e?: InputEvent) => void;
/**
* Complete handler
*/
onComplete?: (value: RIMValue, maskRef: RIMaskRef, e?: InputEvent) => void;
/**
* Is the field read only?
*/
readOnly?: boolean;
/**
* Search case
*/
search?: boolean;
};
/**
* Mask input
* https://imask.js.org/
* @param props Props
* @returns Component
*/
export declare function MaskInput(props: MaskInputProps): import("react/jsx-runtime").JSX.Element;
export {};