UNPKG

@arche-mc2/arche-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

58 lines (57 loc) 1.82 kB
import { Tooltip } from '../../Display/Tooltip'; import { ArcheIconName } from '../../../Common/theming/icons'; import { CommonInputTextProps } from '../_Common/BaseControl/BaseInput'; import { InputType } from '../_Common/Styled/Input/types'; import { InputIconPosition } from '../_Common/Styled/Input/types'; export declare type WidthSize = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'fill'; export declare type HeightSize = 'normal' | 'large'; export interface Validation { pattern: RegExp; errorMessage: string; } export interface UpInputStyledProps extends CommonProps<string> { color?: string; backgroundColor?: string; borderColor?: string; type?: InputType; showError?: boolean; onChange?: (data: any) => void; className?: string; value: string; maxLength?: number; focused?: boolean; dataFor?: string; autoFocus?: boolean; hasClearOption: boolean; onClear?: () => void; isLoading?: boolean; } export interface CommonProps<VT> extends CommonInputTextProps<VT> { disabled?: boolean; placeholder?: string; height?: HeightSize; width?: WidthSize; readonly?: boolean; tooltip?: string | Tooltip; showError?: boolean; showSuccess?: boolean; iconName?: ArcheIconName; iconPosition?: InputIconPosition; rounded?: boolean; autocomplete?: string; id?: string; autoFocus?: boolean; } export interface UpInputProps extends CommonProps<string> { type?: InputType; hasError?: boolean; value?: string; validation?: Array<Validation>; maxLength?: number; hasClearOption?: boolean; onClear?: () => void; isLoading?: boolean; focused?: boolean; className?: string; showValidationStatus?: boolean; }