@ssplib/react-components
Version:
SSP React Components
15 lines (14 loc) • 564 B
TypeScript
import React from 'react';
import { IMaskInput } from 'react-imask';
export type IMaskConfig = Partial<React.ComponentProps<typeof IMaskInput>>;
interface MaskInputProps {
formConfig: {
name: string;
} & Record<string, any>;
defaultValue?: string;
disabled?: boolean;
imaskConfig: IMaskConfig;
onMaskChange?: (value: string, setMask: React.Dispatch<React.SetStateAction<IMaskConfig['mask']>>) => void;
}
export default function MaskInput({ formConfig, disabled, imaskConfig, onMaskChange }: MaskInputProps): JSX.Element;
export {};