UNPKG

notistack-v2-maintained

Version:

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

24 lines (23 loc) 1.92 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const jsx_runtime_1 = require("@emotion/react/jsx-runtime"); const SvgIcon_1 = __importDefault(require("@mui/material/SvgIcon")); const CheckIcon = (props) => ((0, jsx_runtime_1.jsx)(SvgIcon_1.default, Object.assign({}, props, { children: (0, jsx_runtime_1.jsx)("path", { d: "M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41\n 10.59L10 14.17L17.59 6.58L19 8L10 17Z" }) }))); const WarningIcon = (props) => ((0, jsx_runtime_1.jsx)(SvgIcon_1.default, Object.assign({}, props, { children: (0, jsx_runtime_1.jsx)("path", { d: "M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z" }) }))); const ErrorIcon = (props) => ((0, jsx_runtime_1.jsx)(SvgIcon_1.default, Object.assign({}, props, { children: (0, jsx_runtime_1.jsx)("path", { d: "M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,\n 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,\n 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z" }) }))); const InfoIcon = (props) => ((0, jsx_runtime_1.jsx)(SvgIcon_1.default, Object.assign({}, props, { children: (0, jsx_runtime_1.jsx)("path", { d: "M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,\n 0 22,12A10,10 0 0,0 12,2Z" }) }))); const iconStyles = { fontSize: 20, marginInlineEnd: 8 }; const defaultIconVariants = { default: undefined, success: (0, jsx_runtime_1.jsx)(CheckIcon, { style: iconStyles }), warning: (0, jsx_runtime_1.jsx)(WarningIcon, { style: iconStyles }), error: (0, jsx_runtime_1.jsx)(ErrorIcon, { style: iconStyles }), info: (0, jsx_runtime_1.jsx)(InfoIcon, { style: iconStyles }) }; exports.default = defaultIconVariants;