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) 601 B
"use client"; import{jsx as t}from"react/jsx-runtime";import i from"@mui/material/Button";import o from"@mui/material/Snackbar";import e from"@mui/material/Alert";const r=({notify:r,setNotify:a,t:n,...l})=>{const m=(t,i)=>{"clickaway"!==i&&a({...r,open:!1})};return t(o,{open:r.open,autoHideDuration:6e3,anchorOrigin:{vertical:"bottom",horizontal:"left"},onClose:m,...l,children:t(e,{icon:!1,elevation:6,variant:"filled",severity:r.severity,action:t(i,{"aria-label":"close","data-testid":"okBtn",onClick:m,color:"inherit",size:"small",children:n("OK")}),children:r.msg})})};export{r as Notification};