New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a string close button #23
Comments
I feel this is way too much customization for such a small component. Could you explain the intension behind to understand better? |
Would also prefer a HTML string option on I implemented a custom close icon using custom HTML in const toast = Toastify({
text: `
<div class="toast-message">${htmlEscape(message)}</div>
<div class="toast-close"><svg/></div>
`,
});
toast.showToast();
toast.toastElement.querySelector('.toast-close').addEventListener('click', () => {
toast.removeElement(toast.toastElement);
}); |
Got the same thing going on |
Hello,
Since it is possible to add a string of characters within the content, it would be nice to also be able to customize the closing button with inline SVG, img tag, etc.
Ex:
If the close property is mentioned then its value is true. Then we can directly add our HTML markup.
What do you think ?
The text was updated successfully, but these errors were encountered: