|
1 | 1 | import * as React from 'react';
|
2 |
| -import { StandardProps, PropTypes } from '..'; |
| 2 | +import { PropTypes } from '..'; |
| 3 | +import { OverridableComponent, SimplifiedPropsOf } from '../OverridableComponent'; |
3 | 4 |
|
4 |
| -export interface ChipProps |
5 |
| - extends StandardProps<React.HTMLAttributes<HTMLDivElement>, ChipClassKey> { |
6 |
| - avatar?: React.ReactElement; |
7 |
| - clickable?: boolean; |
8 |
| - color?: PropTypes.Color; |
9 |
| - component?: React.ElementType<ChipProps>; |
10 |
| - deleteIcon?: React.ReactElement; |
11 |
| - icon?: React.ReactElement; |
12 |
| - label?: React.ReactNode; |
13 |
| - onDelete?: React.EventHandler<any>; |
14 |
| - variant?: 'default' | 'outlined'; |
15 |
| -} |
| 5 | +declare const Chip: OverridableComponent<{ |
| 6 | + props: { |
| 7 | + avatar?: React.ReactElement; |
| 8 | + clickable?: boolean; |
| 9 | + color?: PropTypes.Color; |
| 10 | + deleteIcon?: React.ReactElement; |
| 11 | + icon?: React.ReactElement; |
| 12 | + label?: React.ReactNode; |
| 13 | + onDelete?: React.EventHandler<any>; |
| 14 | + variant?: 'default' | 'outlined'; |
| 15 | + }; |
| 16 | + defaultComponent: 'div'; |
| 17 | + classKey: ChipClassKey; |
| 18 | +}>; |
16 | 19 |
|
17 | 20 | export type ChipClassKey =
|
18 | 21 | | 'root'
|
@@ -41,6 +44,6 @@ export type ChipClassKey =
|
41 | 44 | | 'deleteIconOutlinedColorPrimary'
|
42 | 45 | | 'deleteIconOutlinedColorSecondary';
|
43 | 46 |
|
44 |
| -declare const Chip: React.ComponentType<ChipProps>; |
| 47 | +export type ChipProps = SimplifiedPropsOf<typeof Chip>; |
45 | 48 |
|
46 | 49 | export default Chip;
|
0 commit comments