UNPKG

@nexusui/components

Version:

These are custom components specially-developed for NexusUI applications. They will make your life easier by giving you out-of-the-box implementations for various high-level UI elements that you can drop directly into your application.

3 lines (2 loc) 778 B
"use client"; "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@mui/material/Button"),i=require("@mui/material/Snackbar"),r=require("@mui/material/Alert");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=a(t),n=a(i),l=a(r);exports.Notification=({notify:t,setNotify:i,t:r,...a})=>{const u=(e,r)=>{"clickaway"!==r&&i({...t,open:!1})};return e.jsx(n.default,{open:t.open,autoHideDuration:6e3,anchorOrigin:{vertical:"bottom",horizontal:"left"},onClose:u,...a,children:e.jsx(l.default,{icon:!1,elevation:6,variant:"filled",severity:t.severity,action:e.jsx(o.default,{"aria-label":"close","data-testid":"okBtn",onClick:u,color:"inherit",size:"small",children:r("OK")}),children:t.msg})})};