1 | import * as React from 'react';
|
2 | import { PropTypes } from '..';
|
3 | import { OverridableComponent, OverrideProps } from '../OverridableComponent';
|
4 |
|
5 | export interface ChipTypeMap<P = {}, D extends React.ElementType = 'div'> {
|
6 | props: P & {
|
7 | |
8 |
|
9 |
|
10 | avatar?: React.ReactElement;
|
11 | |
12 |
|
13 |
|
14 |
|
15 | children?: null;
|
16 | |
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 | clickable?: boolean;
|
24 | |
25 |
|
26 |
|
27 | color?: Exclude<PropTypes.Color, 'inherit'>;
|
28 | |
29 |
|
30 |
|
31 | deleteIcon?: React.ReactElement;
|
32 | |
33 |
|
34 |
|
35 | disabled?: boolean;
|
36 | |
37 |
|
38 |
|
39 | icon?: React.ReactElement;
|
40 | |
41 |
|
42 |
|
43 | label?: React.ReactNode;
|
44 | |
45 |
|
46 |
|
47 |
|
48 | onDelete?: React.EventHandler<any>;
|
49 | |
50 |
|
51 |
|
52 | size?: 'small' | 'medium';
|
53 | |
54 |
|
55 |
|
56 | variant?: 'default' | 'outlined';
|
57 | };
|
58 | defaultComponent: D;
|
59 | classKey: ChipClassKey;
|
60 | }
|
61 |
|
62 |
|
63 |
|
64 |
|
65 |
|
66 |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 | declare const Chip: OverridableComponent<ChipTypeMap>;
|
73 |
|
74 | export type ChipClassKey =
|
75 | | 'root'
|
76 | | 'sizeSmall'
|
77 | | 'colorPrimary'
|
78 | | 'colorSecondary'
|
79 | | 'disabled'
|
80 | | 'clickable'
|
81 | | 'clickableColorPrimary'
|
82 | | 'clickableColorSecondary'
|
83 | | 'deletable'
|
84 | | 'deletableColorPrimary'
|
85 | | 'deletableColorSecondary'
|
86 | | 'outlined'
|
87 | | 'outlinedPrimary'
|
88 | | 'outlinedSecondary'
|
89 | | 'avatar'
|
90 | | 'avatarSmall'
|
91 | | 'avatarColorPrimary'
|
92 | | 'avatarColorSecondary'
|
93 | | 'icon'
|
94 | | 'iconSmall'
|
95 | | 'iconColorPrimary'
|
96 | | 'iconColorSecondary'
|
97 | | 'label'
|
98 | | 'labelSmall'
|
99 | | 'deleteIcon'
|
100 | | 'deleteIconSmall'
|
101 | | 'deleteIconColorPrimary'
|
102 | | 'deleteIconColorSecondary'
|
103 | | 'deleteIconOutlinedColorPrimary'
|
104 | | 'deleteIconOutlinedColorSecondary';
|
105 |
|
106 | export type ChipProps<
|
107 | D extends React.ElementType = ChipTypeMap['defaultComponent'],
|
108 | P = {}
|
109 | > = OverrideProps<ChipTypeMap<P, D>, D>;
|
110 |
|
111 | export default Chip;
|