mirror of
https://github.com/markbeep/AudioBookRequest.git
synced 2026-05-16 14:08:23 -05:00
31 lines
685 B
HTML
31 lines
685 B
HTML
<link
|
|
rel="stylesheet"
|
|
type="text/css"
|
|
href="https://cdn.jsdelivr.net/npm/toastify-js/src/toastify.min.css"
|
|
/>
|
|
<script
|
|
type="text/javascript"
|
|
src="https://cdn.jsdelivr.net/npm/toastify-js"
|
|
></script>
|
|
<script>
|
|
const toast = (message, type = "success") => {
|
|
const classNames = {
|
|
success: "success-alert",
|
|
error: "error-alert",
|
|
info: "info-alert",
|
|
};
|
|
Toastify({
|
|
text: message,
|
|
duration: type === "error" ? 10000 : 3000,
|
|
close: true,
|
|
gravity: "top",
|
|
position: "right",
|
|
stopOnFocus: true,
|
|
className: classNames[type],
|
|
style: {
|
|
background: "unset",
|
|
},
|
|
}).showToast();
|
|
};
|
|
</script>
|