Blame view

天文台pc/tianwentai-ui/node_modules/@mui/material/esm/Radio/Radio.d.ts 3.04 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
  import * as React from 'react';
  import { SxProps } from '@mui/system';
  import { OverridableStringUnion } from '@mui/types';
  import { Theme } from "../styles/index.js";
  import { InternalStandardProps as StandardProps } from "../internal/index.js";
  import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.js";
  import { SwitchBaseProps } from "../internal/SwitchBase.js";
  import { RadioClasses } from "./radioClasses.js";
  export interface RadioPropsSizeOverrides {}
  export interface RadioPropsColorOverrides {}
  export interface RadioRootSlotPropsOverrides {}
  export interface RadioInputSlotPropsOverrides {}
  export interface RadioSlots {
    /**
     * The component that renders the root slot.
     * @default SwitchBase
     */
    root: React.ElementType;
    /**
     * The component that renders the input slot.
     * @default SwitchBase's input
     */
    input: React.ElementType;
  }
  export type RadioSlotsAndSlotProps = CreateSlotsAndSlotProps<RadioSlots, {
    /**
     * Props forwarded to the root slot.
     * By default, the available props are based on the span element.
     */
    root: SlotProps<React.ElementType<SwitchBaseProps>, RadioRootSlotPropsOverrides, RadioOwnerState>;
    /**
     * Props forwarded to the input slot.
     * By default, the available props are based on the input element.
     */
    input: SlotProps<'input', RadioInputSlotPropsOverrides, RadioOwnerState>;
  }>;
  export interface RadioProps extends StandardProps<SwitchBaseProps, 'checkedIcon' | 'color' | 'icon' | 'type' | 'slots' | 'slotProps'>, RadioSlotsAndSlotProps {
    /**
     * The icon to display when the component is checked.
     * @default <RadioButtonIcon checked />
     */
    checkedIcon?: React.ReactNode;
    /**
     * Override or extend the styles applied to the component.
     */
    classes?: Partial<RadioClasses>;
    /**
     * The color of the component.
     * It supports both default and custom theme colors, which can be added as shown in the
     * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
     * @default 'primary'
     */
    color?: OverridableStringUnion<'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning' | 'default', RadioPropsColorOverrides>;
    /**
     * If `true`, the component is disabled.
     */
    disabled?: boolean;
    /**
     * The icon to display when the component is unchecked.
     * @default <RadioButtonIcon />
     */
    icon?: React.ReactNode;
    /**
     * The size of the component.
     * `small` is equivalent to the dense radio styling.
     * @default 'medium'
     */
    size?: OverridableStringUnion<'small' | 'medium', RadioPropsSizeOverrides>;
    /**
     * The system prop that allows defining system overrides as well as additional CSS styles.
     */
    sx?: SxProps<Theme>;
  }
  export interface RadioOwnerState extends Omit<RadioProps, 'slots' | 'slotProps'> {}
  
  /**
   *
   * Demos:
   *
   * - [Radio Group](https://mui.com/material-ui/react-radio-button/)
   *
   * API:
   *
   * - [Radio API](https://mui.com/material-ui/api/radio/)
   * - inherits [ButtonBase API](https://mui.com/material-ui/api/button-base/)
   */
  export default function Radio(props: RadioProps): React.JSX.Element;