Skip to content
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

Feature: Custom icons/Unicode characters without resorting to fully custom frame #25

Closed
metasim opened this issue May 28, 2024 · 1 comment

Comments

@metasim
Copy link

metasim commented May 28, 2024

Great library! Thanks for sharing it!

Obviously not essential, but wanted to note it would be nice if we could somehow override this mapping in Toasts::default_toast_contents without resorting to a fully custom toast rendering:

let (icon, color) = match toast.kind {
    ToastKind::Warning => ("⚠", WARNING_COLOR),
    ToastKind::Error => ("❗", ERROR_COLOR),
    ToastKind::Success => ("✔", SUCCESS_COLOR),
    _ => ("ℹ", INFO_COLOR),
};
@urholaukkarinen
Copy link
Owner

Thanks for the issue! Toasts now have a ToastStyle that can be used to customize the icons and the close button text without having to use a fully custom toast.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants