@material-ui/core APIs
- Button
- Typography
- IconButton
- Grid
- TextField
- makeStyles
- Box
- List
- ListItem
- CircularProgress
- ListItemText
- Paper
- Divider
- Tooltip
- DialogContent
- Toolbar
- AppBar
- Card
- Dialog
- Container
- DialogTitle
- FormControl
- MenuItem
- Theme
- FormControlLabel
- CardContent
- CssBaseline
- DialogActions
- createStyles
- Select
- Link
- Checkbox
- DialogContentText
- Snackbar
- TableCell
- TableRow
- Table
- TableBody
- useMediaQuery
- InputAdornment
- ListItemIcon
- Switch
- Chip
- TableHead
- InputLabel
- withStyles
- Avatar
- ThemeProvider
- Drawer
- LinearProgress
- Menu
- CardActions
- createMuiTheme
- TableContainer
- Tab
- Tabs
- Slider
- ListItemSecondaryAction
- useTheme
- CardHeader
- Collapse
- Popover
- Radio
- Hidden
- FormGroup
- Fade
- InputBase
- FormHelperText
- ListSubheader
- Fab
- Input
- Badge
- Step
- AccordionDetails
- AccordionSummary
- RadioGroup
- ButtonGroup
- Slide
- ListItemAvatar
- Stepper
- SvgIcon
- Accordion
- StepLabel
- Modal
- FormLabel
- ClickAwayListener
- ButtonProps
- WithStyles
- Backdrop
- Popper
- createTheme
- ButtonBase
- CardMedia
- MuiThemeProvider
- OutlinedInput
- TextFieldProps
- Grow
- TablePagination
- TextareaAutosize
- darken
- CardActionArea
- TypographyProps
- StepButton
- SelectProps
- Zoom
- TableSortLabel
- styled
- lighten
- InputProps
- GridProps
- fade
- ThemeOptions
- BoxProps
- ExpansionPanel
- ExpansionPanelSummary
- ExpansionPanelDetails
- useScrollTrigger
- TooltipProps
- PopoverProps
- MobileStepper
- TableFooter
- Icon
- debounce
- Breadcrumbs
- BottomNavigation
- StepConnector
- SwipeableDrawer
- ButtonBaseProps
- MenuList
- DialogProps
- Portal
- SvgIconTypeMap
- capitalize
- alpha
- colors
- InputBaseProps
- NativeSelect
- ChipProps
- IconButtonProps
- emphasize
- SnackbarContent
- PaletteType
- CheckboxProps
- GridSize
- GridItemsAlignment
- SvgIconProps
- SnackbarOrigin
- NoSsr
- withTheme
- WithTheme
- TextareaAutosizeProps
- ExpansionPanelActions
- createSvgIcon
- SnackbarContentProps
- BreadcrumbsProps
- LinearProgressProps
- responsiveFontSizes
- ThemeProviderProps
- GridSpacing
- SliderTypeMap
- TabsActions
- PaperProps
- SnackbarCloseReason
- Alert
- Stack
- Skeleton
- ExtendButton
- ExtendButtonBase
- AlertProps
- ImageList
- ImageListItem
- StepContent
- getLuminance
- LinkProps
- StepIconProps
- ToolbarProps
- isWidthUp
- WithWidthProps
- isWidthDown
- PopperProps
- Options
- ServerStyleSheets
- WithWidth
- BottomNavigationAction
- InputAdornmentProps
- FormControlProps
- hexToRgb
- ListItemProps
- AppBarProps
- TypographyClassKey
- Autocomplete
- StylesProvider
Other Related APIs
- react#useState
- react#ReactElement
- react#MouseEvent
- react#SyntheticEvent
- @material-ui/core#Typography
- @material-ui/core#IconButton
- @material-ui/core#Theme
- @material-ui/core#Slide
- @material-ui/core#Snackbar
- @material-ui/core#makeStyles
- @material-ui/core#createStyles
- @material-ui/core#SnackbarCloseReason
- @material-ui/core/colors#amber
- @material-ui/core/colors#red
- @material-ui/core/colors#green
- react-feather#X
@material-ui/core#SnackbarContent TypeScript Examples
The following examples show how to use
@material-ui/core#SnackbarContent.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: index.tsx From react-app-architecture with Apache License 2.0 | 6 votes |
function SnackbarContentWrapper({
className,
message,
onClose,
variant = 'success',
...other
}: PropSnackbarContent): ReactElement {
const classes = useStyles();
const Icon = variantIcon[variant];
return (
<SnackbarContent
className={clsx(classes[variant], className)}
aria-describedby="client-snackbar"
message={
<span id="client-snackbar" className={classes.message}>
<Icon className={clsx(classes.icon, classes.iconVariant)} />
{message}
</span>
}
action={[
<IconButton key="close" aria-label="close" color="inherit" onClick={onClose}>
<CloseIcon className={classes.icon} />
</IconButton>,
]}
{...other}
/>
);
}
Example #2
Source File: SnackbarNotification.tsx From firebase-react-typescript-project-template with MIT License | 5 votes |
SnackbarNotification = () => {
const classes = useStyles({});
const {
isOpen,
message,
variant,
closeNotification,
} = useSnackbarNotification();
return (
<Snackbar
anchorOrigin={{
vertical: "bottom",
horizontal: "center",
}}
TransitionComponent={SlideTransition}
open={isOpen}
autoHideDuration={5000}
onClose={closeNotification}
className={classes.root}
>
<SnackbarContent
classes={{
root: clsx(classes.snackbarContent, classes[variant]),
message: classes.message,
}}
message={
<>
<Typography variant="body1" className={classes.messageText}>
{message}
</Typography>
<IconButton
key="close"
color="inherit"
onClick={closeNotification}
className={classes.closeButton}
>
<X />
</IconButton>
</>
}
/>
</Snackbar>
);
}