UNPKG

1.43 kBTypeScriptView Raw
1import * as React from "react";
2import { AbstractPureComponent2 } from "../../common";
3import { IElementRefProps, OptionProps } from "../../common/props";
4import { IconProps } from "../icon/icon";
5export declare type HTMLSelectProps = IHTMLSelectProps;
6/** @deprecated use HTMLSelectPRops */
7export interface IHTMLSelectProps extends IElementRefProps<HTMLSelectElement>, React.SelectHTMLAttributes<HTMLSelectElement> {
8 /** Whether this element is non-interactive. */
9 disabled?: boolean;
10 /** Whether this element should fill its container. */
11 fill?: boolean;
12 /** Props to spread to the `<Icon>` element. */
13 iconProps?: Partial<IconProps>;
14 /** Whether to use large styles. */
15 large?: boolean;
16 /** Whether to use minimal styles. */
17 minimal?: boolean;
18 /** Multiple select is not supported. */
19 multiple?: never;
20 /** Change event handler. Use `event.currentTarget.value` to access the new value. */
21 onChange?: React.ChangeEventHandler<HTMLSelectElement>;
22 /**
23 * Shorthand for supplying options: an array of basic types or
24 * `{ label?, value }` objects. If no `label` is supplied, `value`
25 * will be used as the label.
26 */
27 options?: Array<string | number | OptionProps>;
28 /** Controlled value of this component. */
29 value?: string | number;
30}
31export declare class HTMLSelect extends AbstractPureComponent2<HTMLSelectProps> {
32 render(): JSX.Element;
33}