UNPKG

1 kBTypeScriptView Raw
1import { ComponentType, ReactElement, Ref as ElementRef } from 'react';
2import { CSSObject } from '@emotion/serialize';
3
4import { colors, spacing } from '../theme';
5
6import { ClassNamesState, Theme } from '../types';
7
8export interface InputProps {
9 cx: (a: string | null, b: ClassNamesState, c: string) => string | void;
10 getStyles: (name: string, props: any) => {};
11 theme: Theme;
12 /** Reference to the internal element */
13 innerRef: (element: ElementRef<any>) => void;
14 /** Set whether the input should be visible. Does not affect input size. */
15 isHidden: boolean;
16 /** Whether the input is disabled */
17 isDisabled?: boolean | undefined;
18 className?: string | undefined;
19 /** Autocomplete value for the Select Input */
20 autoComplete?: string | undefined;
21}
22
23export function inputCSS(props: InputProps): CSSObject;
24export function inputStyle(isHidden: boolean): React.CSSProperties;
25
26declare function Input(props: InputProps): ReactElement;
27
28export default Input;