UNPKG

@kiwicom/orbit-components

Version:

Orbit-components is a React component library which provides developers with the easiest possible way of building Kiwi.com’s products.

57 lines (47 loc) 1.8 kB
// @flow /* DOCUMENTATION: https://orbit.kiwi/components/inputfield/ */ import type { ReactComponentStyled } from "styled-components"; import type { Globals, Ref, Translation, TranslationString } from "../common/common.js.flow"; import type { spaceAfter } from "../common/getSpacingToken"; export type Size = "small" | "normal"; type InputMode = "numeric" | "tel" | "decimal" | "email" | "url" | "search" | "text" | "none"; export type Props = {| ...Globals, ...Ref, ...spaceAfter, +size?: Size, +type?: "text" | "number" | "email" | "password" | "passportid", +inputMode?: InputMode, +name?: string, +label?: Translation, +inlineLabel?: boolean, +value?: (() => string | number) | string | number, +placeholder?: TranslationString, +prefix?: React$Node, +suffix?: React$Node, +help?: React$Node, +error?: React$Node, +tags?: React$Node, +disabled?: boolean, +maxValue?: number, +minValue?: number, +maxLength?: number, +minLength?: number, required?: boolean, tabIndex?: string, +readOnly?: boolean, +autoComplete?: string, +id?: string, +onChange?: (ev: SyntheticInputEvent<HTMLInputElement>) => void | Promise<any>, +onFocus?: (ev: SyntheticInputEvent<HTMLInputElement>) => void | Promise<any>, +onBlur?: (ev: SyntheticInputEvent<HTMLInputElement>) => void | Promise<any>, +onKeyDown?: (ev: SyntheticKeyboardEvent<HTMLInputElement>) => void | Promise<any>, +onKeyUp?: (ev: SyntheticKeyboardEvent<HTMLInputElement>) => void | Promise<any>, |}; declare export var FakeInput: ReactComponentStyled<any>; declare export var Input: ReactComponentStyled<any>; declare export var Prefix: ReactComponentStyled<any>; declare export var InputContainer: ReactComponentStyled<any>; declare export default React$ComponentType<Props>;