Blame view

天文台pc/tianwentai-ui/node_modules/@mui/material/esm/NativeSelect/NativeSelect.d.ts 2.21 KB
bc518174   王天杨   提交两个项目文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
  import * as React from 'react';
  import { SxProps } from '@mui/system';
  import { Theme } from "../styles/index.js";
  import { InternalStandardProps as StandardProps } from "../internal/index.js";
  import { InputProps } from "../Input/index.js";
  import { NativeSelectInputProps } from "./NativeSelectInput.js";
  import { NativeSelectClasses } from "./nativeSelectClasses.js";
  export interface NativeSelectProps extends StandardProps<InputProps, 'inputProps' | 'value' | 'onChange'> {
    /**
     * The option elements to populate the select with.
     * Can be some `<option>` elements.
     */
    children?: React.ReactNode;
    /**
     * Override or extend the styles applied to the component.
     * @default {}
     */
    classes?: Partial<NativeSelectClasses>;
    /**
     * The icon that displays the arrow.
     * @default ArrowDropDownIcon
     */
    IconComponent?: React.ElementType;
    /**
     * An `Input` element; does not have to be a material-ui specific `Input`.
     * @default <Input />
     */
    input?: React.ReactElement<unknown, any>;
    /**
     * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/select#attributes) applied to the `select` element.
     */
    inputProps?: Partial<NativeSelectInputProps>;
    /**
     * Callback fired when a menu item is selected.
     *
     * @param {React.ChangeEvent<HTMLSelectElement>} event The event source of the callback.
     * You can pull out the new value by accessing `event.target.value` (string).
     */
    onChange?: NativeSelectInputProps['onChange'];
    /**
     * The system prop that allows defining system overrides as well as additional CSS styles.
     */
    sx?: SxProps<Theme>;
    /**
     * The `input` value. The DOM API casts this to a string.
     */
    value?: unknown;
    /**
     * The variant to use.
     */
    variant?: 'standard' | 'outlined' | 'filled';
  }
  
  /**
   * An alternative to `<Select native />` with a much smaller bundle size footprint.
   *
   * Demos:
   *
   * - [Select](https://mui.com/material-ui/react-select/)
   *
   * API:
   *
   * - [NativeSelect API](https://mui.com/material-ui/api/native-select/)
   * - inherits [Input API](https://mui.com/material-ui/api/input/)
   */
  declare const NativeSelect: ((props: NativeSelectProps) => React.JSX.Element) & {
    muiName: string;
  };
  export default NativeSelect;