1 | import * as React from 'react';
|
2 | import { SxProps } from '@mui/system';
|
3 | import { OverridableStringUnion } from '@mui/types';
|
4 | import { Theme } from '../styles';
|
5 | import { OverridableComponent, OverrideProps } from '../OverridableComponent';
|
6 | import { IconClasses } from './iconClasses';
|
7 |
|
8 | export interface IconPropsSizeOverrides {}
|
9 |
|
10 | export interface IconPropsColorOverrides {}
|
11 |
|
12 | export interface IconOwnProps {
|
13 | |
14 |
|
15 |
|
16 |
|
17 |
|
18 | baseClassName?: string;
|
19 | |
20 |
|
21 |
|
22 | children?: React.ReactNode;
|
23 | |
24 |
|
25 |
|
26 | classes?: Partial<IconClasses>;
|
27 | |
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 | color?: OverridableStringUnion<
|
34 | | 'inherit'
|
35 | | 'action'
|
36 | | 'disabled'
|
37 | | 'primary'
|
38 | | 'secondary'
|
39 | | 'error'
|
40 | | 'info'
|
41 | | 'success'
|
42 | | 'warning',
|
43 | IconPropsColorOverrides
|
44 | >;
|
45 | |
46 |
|
47 |
|
48 |
|
49 | fontSize?: OverridableStringUnion<
|
50 | 'inherit' | 'large' | 'medium' | 'small',
|
51 | IconPropsSizeOverrides
|
52 | >;
|
53 | |
54 |
|
55 |
|
56 | sx?: SxProps<Theme>;
|
57 | }
|
58 |
|
59 | export interface IconTypeMap<
|
60 | AdditionalProps = {},
|
61 | RootComponent extends React.ElementType = 'span',
|
62 | > {
|
63 | props: AdditionalProps & IconOwnProps;
|
64 | defaultComponent: RootComponent;
|
65 | }
|
66 |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 |
|
73 |
|
74 |
|
75 |
|
76 |
|
77 | declare const Icon: OverridableComponent<IconTypeMap> & { muiName: string };
|
78 |
|
79 | export type IconProps<
|
80 | RootComponent extends React.ElementType = IconTypeMap['defaultComponent'],
|
81 | AdditionalProps = {},
|
82 | > = OverrideProps<IconTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
|
83 | component?: React.ElementType;
|
84 | };
|
85 |
|
86 | export default Icon;
|