1 | import * as React from 'react';
|
2 | import { ClickAwayListener, ClickAwayListenerProps } from '../ClickAwayListener';
|
3 | import { UseSnackbarParameters } from '../useSnackbar';
|
4 | import { PolymorphicProps, SlotComponentProps } from '../utils';
|
5 | export interface SnackbarRootSlotPropsOverrides {
|
6 | }
|
7 | export interface SnackbarClickAwayListenerSlotPropsOverrides {
|
8 | }
|
9 | export interface SnackbarOwnProps extends Omit<UseSnackbarParameters, 'ref'> {
|
10 | children?: React.ReactNode;
|
11 | |
12 |
|
13 |
|
14 |
|
15 |
|
16 | slots?: SnackbarSlots;
|
17 | |
18 |
|
19 |
|
20 |
|
21 | slotProps?: {
|
22 | clickAwayListener?: SlotComponentProps<typeof ClickAwayListener, SnackbarClickAwayListenerSlotPropsOverrides, SnackbarOwnerState>;
|
23 | root?: SlotComponentProps<'div', SnackbarRootSlotPropsOverrides, SnackbarOwnerState>;
|
24 | };
|
25 | |
26 |
|
27 |
|
28 |
|
29 | exited?: boolean;
|
30 | }
|
31 | export interface SnackbarSlots {
|
32 | |
33 |
|
34 |
|
35 |
|
36 | root?: React.ElementType;
|
37 | }
|
38 | export interface SnackbarTypeMap<AdditionalProps = {}, RootComponentType extends React.ElementType = 'div'> {
|
39 | props: SnackbarOwnProps & AdditionalProps;
|
40 | defaultComponent: RootComponentType;
|
41 | }
|
42 | export type SnackbarProps<RootComponentType extends React.ElementType = SnackbarTypeMap['defaultComponent']> = PolymorphicProps<SnackbarTypeMap<{}, RootComponentType>, RootComponentType>;
|
43 | export type SnackbarOwnerState = SnackbarOwnProps;
|
44 | export type SnackbarRootSlotProps = {
|
45 | ownerState: SnackbarOwnerState;
|
46 | className?: string;
|
47 | children?: React.ReactNode;
|
48 | ref: React.Ref<any>;
|
49 | };
|
50 | export interface SnackbarClickAwayListenerSlotProps extends ClickAwayListenerProps {
|
51 | ownerState: SnackbarOwnerState;
|
52 | }
|