forked from mui/material-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ChipDeleteProps.ts
53 lines (48 loc) · 1.71 KB
/
ChipDeleteProps.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import * as React from 'react';
import { OverridableStringUnion, OverrideProps } from '@mui/types';
import { ColorPaletteProp, VariantProp, SxProps } from '../styles/types';
export type ChipDeleteSlot = 'root';
export interface ChipDeletePropsColorOverrides {}
export interface ChipDeletePropsVariantOverrides {}
export interface ChipDeleteTypeMap<P = {}, D extends React.ElementType = 'button'> {
props: P & {
/**
* The color of the component. It supports those theme colors that make sense for this component.
* @default 'primary'
*/
color?: OverridableStringUnion<ColorPaletteProp, ChipDeletePropsColorOverrides>;
/**
* If provided, it will replace the default icon.
*/
children?: React.ReactNode;
/**
* If `true`, the component is disabled.
* If `undefined`, the value inherits from the parent chip via a React context.
*/
disabled?: boolean;
/**
* Callback fired when component is not disabled and `Backspace`, `Enter` or `Delete` is pressed or when chip is clicked.
*/
onDelete?: React.EventHandler<any>;
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx?: SxProps;
/**
* The variant to use.
* @default 'solid'
*/
variant?: OverridableStringUnion<VariantProp, ChipDeletePropsVariantOverrides>;
};
defaultComponent: D;
}
export type ChipDeleteProps<
D extends React.ElementType = ChipDeleteTypeMap['defaultComponent'],
P = { component?: React.ElementType },
> = OverrideProps<ChipDeleteTypeMap<P, D>, D>;
export interface ChipDeleteOwnerState extends ChipDeleteProps {
/**
* If `true`, the element's focus is visible.
*/
focusVisible?: boolean;
}