import { Icon, Notification as _Notification } from "tiny-ui"; const Notification = ({ type, ...props }) => { let payload = { ...props, placement: "bottomRight" }; if (type && ["info", "success", "warning", "error"].includes(type)) { _Notification[type](payload); } else if (type && ["loader", "loading"].includes(type)) { payload.icon = ( ); _Notification.open(payload); } else if (type && ["announce", "announcement"].includes(type)) { payload.icon = ( ); _Notification.open(payload); } else { _Notification.open(payload); } }; export default Notification;