UNPKG

1.2 kBTypeScriptView Raw
1import * as React from 'react';
2import { StandardProps } from '..';
3import { SwitchBaseProps, SwitchBaseClassKey } from '../internal/SwitchBase';
4
5export interface RadioProps
6 extends StandardProps<SwitchBaseProps, RadioClassKey, 'checkedIcon' | 'color' | 'icon' | 'type'> {
7 /**
8 * The icon to display when the component is checked.
9 */
10 checkedIcon?: React.ReactNode;
11 /**
12 * The color of the component. It supports those theme colors that make sense for this component.
13 */
14 color?: 'primary' | 'secondary' | 'default';
15 /**
16 * If `true`, the radio will be disabled.
17 */
18 disabled?: boolean;
19 /**
20 * The icon to display when the component is unchecked.
21 */
22 icon?: React.ReactNode;
23 /**
24 * The size of the radio.
25 * `small` is equivalent to the dense radio styling.
26 */
27 size?: 'small' | 'medium';
28}
29
30export type RadioClassKey = SwitchBaseClassKey | 'colorPrimary' | 'colorSecondary';
31
32/**
33 *
34 * Demos:
35 *
36 * - [Radio Buttons](https://mui.com/components/radio-buttons/)
37 *
38 * API:
39 *
40 * - [Radio API](https://mui.com/api/radio/)
41 * - inherits [IconButton API](https://mui.com/api/icon-button/)
42 */
43export default function Radio(props: RadioProps): JSX.Element;