UNPKG

1.58 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 children?: React.ReactNode;
9 /** Whether this element is non-interactive. */
10 disabled?: boolean;
11 /** Whether this element should fill its container. */
12 fill?: boolean;
13 /** Props to spread to the `<Icon>` element. */
14 iconProps?: Partial<IconProps>;
15 /** Whether to use large styles. */
16 large?: boolean;
17 /** Whether to use minimal styles. */
18 minimal?: boolean;
19 /** Multiple select is not supported. */
20 multiple?: never;
21 /** Change event handler. Use `event.currentTarget.value` to access the new value. */
22 onChange?: React.ChangeEventHandler<HTMLSelectElement>;
23 /**
24 * Shorthand for supplying options: an array of basic types or
25 * `{ label?, value }` objects. If no `label` is supplied, `value`
26 * will be used as the label.
27 */
28 options?: ReadonlyArray<string | number | OptionProps>;
29 /** Controlled value of this component. */
30 value?: string | number;
31}
32/**
33 * HTML select component
34 *
35 * @see https://blueprintjs.com/docs/#core/components/html-select
36 */
37export declare class HTMLSelect extends AbstractPureComponent2<HTMLSelectProps> {
38 render(): JSX.Element;
39}