UNPKG

notistack-v2-maintained

Version:

Highly customizable notification snackbars (toasts) that can be stacked on top of each other

43 lines (42 loc) 1.67 kB
"use strict"; var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.SnackbarContent = void 0; const jsx_runtime_1 = require("@emotion/react/jsx-runtime"); const styles_1 = require("@mui/material/styles"); const clsx_1 = __importDefault(require("clsx")); const react_1 = require("react"); const componentName = "SnackbarContent"; const classes = { root: `${componentName}-root` }; const Root = (0, styles_1.styled)("div")(({ theme }) => ({ [`&.${classes.root}`]: { display: "flex", flexWrap: "wrap", flexGrow: 1, [theme.breakpoints.up("sm")]: { flexGrow: "initial", minWidth: 288 } } })); const SnackbarContent = (0, react_1.forwardRef)((_a, ref) => { var { className } = _a, props = __rest(_a, ["className"]); return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ ref: ref, className: (0, clsx_1.default)(classes.root, className) }, props))); }); exports.SnackbarContent = SnackbarContent; SnackbarContent.displayName = "SnackbarContent";