SnackbarContent API
Importação
import SnackbarContent from '@mui/material/SnackbarContent';
// ou
import { SnackbarContent } from '@mui/material';Nome do componente
The nameMuiSnackbarContent can be used when providing default props or style overrides in the theme.Propriedades
Propriedades do componente Paper também estão disponíveis.
| Nome | Tipo | Padrão | Descrição | 
|---|---|---|---|
| action | node | The action to display. It renders after the message, at the end of the snackbar. | |
| classes | object | Sobrescreve ou extende os estilos aplicados para o componente. Veja a API CSS abaixo para maiores detalhes. | |
| message | node | The message to display. | |
| role | string | 'alert' | O atributo de regra ARIA do elemento. | 
| sx | Array<func | object | bool> | func | object | The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details. | 
O
ref é encaminhado para o elemento raiz.Herança
While not explicitly documented above, the props of the Paper component are also available on SnackbarContent. You can take advantage of this to target nested components.CSS
| Nome da regra | Classe global | Descrição | 
|---|---|---|
| root | .MuiSnackbarContent-root | Estilos aplicados ao elemento raiz. | 
| message | .MuiSnackbarContent-message | Estilos aplicados a o elemento encapsulador da mensagem. | 
| action | .MuiSnackbarContent-action | Estilos aplicados para o elemento encapsulador da ação se actioné fornecida. | 
Você pode sobrescrever o estilo do componente usando uma dessas opções de customização:
- With a global class name.
- With a rule name as part of the component's styleOverridesproperty in a custom theme.