UNPKG

1.43 kBTypeScriptView Raw
1/** @jsx jsx */
2import { InputHTMLAttributes } from 'react';
3import { jsx } from '@emotion/react';
4import { CommonPropsAndClassName, CSSObjectWithLabel, GroupBase } from '../types';
5export interface InputSpecificProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends InputHTMLAttributes<HTMLInputElement>, CommonPropsAndClassName<Option, IsMulti, Group> {
6 /** Reference to the internal element */
7 innerRef?: (instance: HTMLInputElement | null) => void;
8 /** Set whether the input should be visible. Does not affect input size. */
9 isHidden: boolean;
10 /** Whether the input is disabled */
11 isDisabled?: boolean;
12 /** The ID of the form that the input belongs to */
13 form?: string;
14 /** Set className for the input element */
15 inputClassName?: string;
16}
17export declare type InputProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> = InputSpecificProps<Option, IsMulti, Group>;
18export declare const inputCSS: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ isDisabled, value, theme: { spacing, colors }, }: InputProps<Option, IsMulti, Group>, unstyled: boolean) => CSSObjectWithLabel;
19declare const Input: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: InputProps<Option, IsMulti, Group>) => jsx.JSX.Element;
20export default Input;