1 | import * as React from 'react';
|
2 | import { OverrideProps, OverridableTypeMap, OverridableComponent, 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 |
|
70 |
|
71 |
|
72 | export interface ExtendBadgeTypeMap<M extends OverridableTypeMap> {
|
73 | props: M['props'] & BadgeTypeMap['props'];
|
74 | defaultComponent: M['defaultComponent'];
|
75 | }
|
76 | export type ExtendBadge<M extends OverridableTypeMap> = OverridableComponent<ExtendBadgeTypeMap<M>>;
|
77 | export type BadgeProps<RootComponentType extends React.ElementType = BadgeTypeMap['defaultComponent']> = OverrideProps<BadgeTypeMap<{}, RootComponentType>, RootComponentType> & {
|
78 | component?: RootComponentType;
|
79 | };
|
80 | export type BadgeRootSlotProps = {
|
81 | children?: React.ReactNode;
|
82 | className?: string;
|
83 | ownerState: BadgeOwnerState;
|
84 | ref: React.Ref<HTMLSpanElement>;
|
85 | };
|
86 | export type BadgeBadgeSlotProps = {
|
87 | className?: string;
|
88 | children?: React.ReactNode;
|
89 | ownerState: BadgeOwnerState;
|
90 | };
|