UNPKG

@up-group/react-controls

Version:

We know that there are a ton of react UI library projects to choose from. Our hope with this one is to provide the next generation of react components that you can use to bootstrap your next project, or as a reference for building a UIKit. Read on to get

44 lines (43 loc) 1.39 kB
import UpInput from './UpInput'; import { IconName } from '../../../Components/Display/SvgIcon/icons'; import { ThemedProps } from '../../../Common/theming/types'; import { Tooltip } from '../../Display/Tooltip'; export declare type WidthSize = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'fill'; export declare type HeightSize = 'normal' | 'large'; export declare type InputType = 'text' | 'email' | 'number' | 'integer' | 'phone' | 'search'; export interface Validation { pattern: RegExp; errorMessage: string; } export interface UpInputStyledProps extends CommonProps { color?: string; backgroundColor?: string; borderColor?: string; type?: InputType; iconName?: IconName; hasError?: boolean; showError?: boolean; onChange?: (data: any) => void; className?: string; value: string; maxLength?: number; dataFor?: string; } export interface CommonProps extends ThemedProps { disabled?: boolean; placeholder?: string; height?: HeightSize; width?: WidthSize; readonly?: boolean; tooltip?: string | Tooltip; showError?: boolean; } export interface UpInputProps extends CommonProps { type?: InputType; hasError?: boolean; iconName?: IconName; value?: string; validation?: Array<Validation>; maxLength?: number; } export default UpInput;