UNPKG

1.25 kBTypeScriptView Raw
1import * as React from 'react';
2import { SxProps } from '@mui/system';
3import { Theme } from '../styles';
4import { InternalStandardProps as StandardProps } from '..';
5import { PaperProps } from '../Paper';
6import { SnackbarContentClasses } from './snackbarContentClasses';
7
8export interface SnackbarContentProps extends StandardProps<PaperProps, 'children'> {
9 /**
10 * The action to display. It renders after the message, at the end of the snackbar.
11 */
12 action?: React.ReactNode;
13 /**
14 * Override or extend the styles applied to the component.
15 */
16 classes?: Partial<SnackbarContentClasses>;
17 /**
18 * The message to display.
19 */
20 message?: React.ReactNode;
21 /**
22 * The ARIA role attribute of the element.
23 * @default 'alert'
24 */
25 role?: PaperProps['role'];
26 /**
27 * The system prop that allows defining system overrides as well as additional CSS styles.
28 */
29 sx?: SxProps<Theme>;
30}
31
32/**
33 *
34 * Demos:
35 *
36 * - [Snackbar](https://mui.com/material-ui/react-snackbar/)
37 *
38 * API:
39 *
40 * - [SnackbarContent API](https://mui.com/material-ui/api/snackbar-content/)
41 * - inherits [Paper API](https://mui.com/material-ui/api/paper/)
42 */
43export default function SnackbarContent(props: SnackbarContentProps): React.JSX.Element;