1 | import * as React from 'react';
|
2 | import { OverrideProps, Simplify } from '@mui/types';
|
3 | import { SlotComponentProps } from '../utils';
|
4 | export interface BadgeRootSlotPropsOverrides {
|
5 | }
|
6 | export interface BadgeBadgeSlotPropsOverrides {
|
7 | }
|
8 | export type BadgeOwnerState = Simplify<BadgeOwnProps & {
|
9 | badgeContent: React.ReactNode;
|
10 | invisible: boolean;
|
11 | max: number;
|
12 | showZero: boolean;
|
13 | }>;
|
14 | export interface BadgeOwnProps {
|
15 | |
16 |
|
17 |
|
18 | badgeContent?: React.ReactNode;
|
19 | |
20 |
|
21 |
|
22 | children?: React.ReactNode;
|
23 | |
24 |
|
25 |
|
26 |
|
27 | invisible?: boolean;
|
28 | |
29 |
|
30 |
|
31 |
|
32 | max?: number;
|
33 | |
34 |
|
35 |
|
36 |
|
37 | slotProps?: {
|
38 | root?: SlotComponentProps<'span', BadgeRootSlotPropsOverrides, BadgeOwnerState>;
|
39 | badge?: SlotComponentProps<'span', BadgeBadgeSlotPropsOverrides, BadgeOwnerState>;
|
40 | };
|
41 | |
42 |
|
43 |
|
44 |
|
45 |
|
46 | slots?: BadgeSlots;
|
47 | |
48 |
|
49 |
|
50 |
|
51 | showZero?: boolean;
|
52 | }
|
53 | export interface BadgeSlots {
|
54 | |
55 |
|
56 |
|
57 |
|
58 | root?: React.ElementType;
|
59 | |
60 |
|
61 |
|
62 |
|
63 | badge?: React.ElementType;
|
64 | }
|
65 | export interface BadgeTypeMap<AdditionalProps = {}, RootComponentType extends React.ElementType = 'span'> {
|
66 | props: BadgeOwnProps & AdditionalProps;
|
67 | defaultComponent: RootComponentType;
|
68 | }
|
69 | export type BadgeProps<RootComponentType extends React.ElementType = BadgeTypeMap['defaultComponent']> = OverrideProps<BadgeTypeMap<{}, RootComponentType>, RootComponentType>;
|
70 | export type BadgeRootSlotProps = {
|
71 | children?: React.ReactNode;
|
72 | className?: string;
|
73 | ownerState: BadgeOwnerState;
|
74 | ref: React.Ref<HTMLSpanElement>;
|
75 | };
|
76 | export type BadgeBadgeSlotProps = {
|
77 | className?: string;
|
78 | children?: React.ReactNode;
|
79 | ownerState: BadgeOwnerState;
|
80 | };
|