1 | import * as React from 'react';
|
2 | import { PropTypes } from '..';
|
3 | import { OverridableComponent, OverrideProps } from '../OverridableComponent';
|
4 |
|
5 | export interface IconTypeMap<P = {}, D extends React.ElementType = 'span'> {
|
6 | props: P & {
|
7 | color?: PropTypes.Color | 'action' | 'disabled' | 'error';
|
8 | fontSize?: 'default' | 'inherit' | 'large' | 'medium' | 'small';
|
9 | };
|
10 | defaultComponent: D;
|
11 | classKey: IconClassKey;
|
12 | }
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 | declare const Icon: OverridableComponent<IconTypeMap>;
|
25 |
|
26 | export type IconClassKey =
|
27 | | 'root'
|
28 | | 'colorSecondary'
|
29 | | 'colorAction'
|
30 | | 'colorDisabled'
|
31 | | 'colorError'
|
32 | | 'colorPrimary'
|
33 | | 'fontSizeInherit'
|
34 | | 'fontSizeSmall'
|
35 | | 'fontSizeLarge';
|
36 |
|
37 | export type IconProps<
|
38 | D extends React.ElementType = IconTypeMap['defaultComponent'],
|
39 | P = {}
|
40 | > = OverrideProps<IconTypeMap<P, D>, D>;
|
41 |
|
42 | export default Icon;
|