UNPKG

1.94 kBTypeScriptView Raw
1import { PropTypes } from '..';
2import { ExtendButtonBase, ExtendButtonBaseTypeMap } from '../ButtonBase';
3import { OverrideProps } from '../OverridableComponent';
4
5export type FabTypeMap<P = {}, D extends React.ElementType = 'button'> = ExtendButtonBaseTypeMap<{
6 props: P & {
7 /**
8 * The content of the button.
9 */
10 children: NonNullable<React.ReactNode>;
11 /**
12 * The color of the component. It supports those theme colors that make sense for this component.
13 */
14 color?: PropTypes.Color;
15 /**
16 * If `true`, the button will be disabled.
17 */
18 disabled?: boolean;
19 /**
20 * If `true`, the keyboard focus ripple will be disabled.
21 */
22 disableFocusRipple?: boolean;
23 /**
24 * If `true`, the ripple effect will be disabled.
25 */
26 disableRipple?: boolean;
27 /**
28 * The URL to link to when the button is clicked.
29 * If defined, an `a` element will be used as the root node.
30 */
31 href?: string;
32 /**
33 * The size of the button.
34 * `small` is equivalent to the dense button styling.
35 */
36 size?: 'small' | 'medium' | 'large';
37 /**
38 * The variant to use.
39 * 'round' is deprecated, use 'circular' instead.
40 */
41 variant?: 'circular' | 'extended' | 'round';
42 };
43 defaultComponent: D;
44 classKey: FabClassKey;
45}>;
46
47/**
48 *
49 * Demos:
50 *
51 * - [Floating Action Button](https://mui.com/components/floating-action-button/)
52 *
53 * API:
54 *
55 * - [Fab API](https://mui.com/api/fab/)
56 * - inherits [ButtonBase API](https://mui.com/api/button-base/)
57 */
58declare const Fab: ExtendButtonBase<FabTypeMap>;
59
60export type FabProps<
61 D extends React.ElementType = FabTypeMap['defaultComponent'],
62 P = {}
63> = OverrideProps<FabTypeMap<P, D>, D>;
64
65export type FabClassKey =
66 | 'root'
67 | 'label'
68 | 'primary'
69 | 'secondary'
70 | 'extended'
71 | 'focusVisible'
72 | 'disabled'
73 | 'colorInherit'
74 | 'sizeSmall'
75 | 'sizeMedium';
76
77export default Fab;