@hhgtech/hhg-components
Version:
Hello Health Group common components
28 lines (27 loc) • 1.15 kB
TypeScript
import React from 'react';
import { TextInputProps as MantineTextInputProps, Input as MantineCoreInput } from '@mantine/core';
import { FileInput } from "./file";
import { NumberInput } from "./number";
import { PasswordInput } from "./password";
export type InputProps = Omit<MantineTextInputProps, 'onChange' | 'value'> & {
value?: string;
onChange?(value: string): void;
onChangeRaw?(e: React.ChangeEvent<HTMLInputElement>): void;
};
declare const InputWrapper: React.ForwardRefExoticComponent<Omit<MantineTextInputProps, "onChange" | "value"> & {
value?: string;
onChange?(value: string): void;
onChangeRaw?(e: React.ChangeEvent<HTMLInputElement>): void;
} & React.RefAttributes<HTMLInputElement>>;
type InputWrapperType = typeof InputWrapper;
export interface CompoundedComponent extends InputWrapperType {
Password: typeof PasswordInput;
File: typeof FileInput;
Number: typeof NumberInput;
Wrapper: typeof MantineCoreInput.Wrapper;
}
declare const Input: CompoundedComponent;
export { Input };
export * from "./file";
export * from "./number";
export * from "./password";