UNPKG

873 BTypeScriptView Raw
1import * as React from 'react';
2import { StandardProps } from '..';
3import { PaperProps } from '../Paper';
4
5export interface SnackbarContentProps
6 extends StandardProps<PaperProps, SnackbarContentClassKey, 'children'> {
7 /**
8 * The action to display. It renders after the message, at the end of the snackbar.
9 */
10 action?: React.ReactNode;
11 /**
12 * The message to display.
13 */
14 message?: React.ReactNode;
15 /**
16 * The ARIA role attribute of the element.
17 */
18 role?: PaperProps['role'];
19}
20
21export type SnackbarContentClassKey = 'root' | 'message' | 'action';
22
23/**
24 *
25 * Demos:
26 *
27 * - [Snackbars](https://mui.com/components/snackbars/)
28 *
29 * API:
30 *
31 * - [SnackbarContent API](https://mui.com/api/snackbar-content/)
32 * - inherits [Paper API](https://mui.com/api/paper/)
33 */
34export default function SnackbarContent(props: SnackbarContentProps): JSX.Element;