Enhance Toastify notifications with custom icons and adjust autoClose timing
This commit is contained in:
@@ -272,3 +272,11 @@ Toastify customizations
|
|||||||
background-color: rgba(46, 186, 106, 0.8) !important;
|
background-color: rgba(46, 186, 106, 0.8) !important;
|
||||||
color: inherit !important;
|
color: inherit !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.Toastify__toast--success > .Toastify__toast-icon svg {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Toastify__toast--success > .Toastify__toast-icon::after {
|
||||||
|
content: "🦄" !important;
|
||||||
|
}
|
||||||
|
@@ -164,18 +164,15 @@ export function LyricSearchInputField({ id, placeholder, setShowLyrics }) {
|
|||||||
|
|
||||||
toast.update(toastId, {
|
toast.update(toastId, {
|
||||||
type: "success",
|
type: "success",
|
||||||
render: `🦄 Found! (Took ${duration}s)`,
|
render: `Found! (Took ${duration}s)`,
|
||||||
type: "",
|
|
||||||
className: "Toastify__toast--success",
|
className: "Toastify__toast--success",
|
||||||
autoClose: 2000,
|
autoClose: 2500,
|
||||||
hideProgressBar: true,
|
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
toast.update(toastId, {
|
toast.update(toastId, {
|
||||||
type: "error",
|
type: "error",
|
||||||
render: `😕 ${error.message}`,
|
render: `😕 ${error.message}`,
|
||||||
autoClose: 5000,
|
autoClose: 5000,
|
||||||
hideProgressBar: true,
|
|
||||||
});
|
});
|
||||||
} finally {
|
} finally {
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
|
Reference in New Issue
Block a user