Skip to content

Commit

Permalink
add toast component
Browse files Browse the repository at this point in the history
  • Loading branch information
futurepaul committed May 17, 2024
1 parent ee60537 commit 561b1f6
Show file tree
Hide file tree
Showing 6 changed files with 569 additions and 8 deletions.
4 changes: 4 additions & 0 deletions assets/icons/small_close.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/components/icon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ pub enum SvgIcon {
Copy,
Plus,
Qr,
SmallClose,
}

pub fn map_icon(icon: SvgIcon) -> Svg<'static, Theme> {
Expand All @@ -29,5 +30,6 @@ pub fn map_icon(icon: SvgIcon) -> Svg<'static, Theme> {
SvgIcon::Copy => Svg::from_path("assets/icons/copy.svg"),
SvgIcon::Plus => Svg::from_path("assets/icons/plus.svg"),
SvgIcon::Qr => Svg::from_path("assets/icons/qr.svg"),
SvgIcon::SmallClose => Svg::from_path("assets/icons/small_close.svg"),
}
}
3 changes: 3 additions & 0 deletions src/components/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ pub use rules::*;

mod layout;
pub use layout::*;

mod toast;
pub use toast::*;
Loading

0 comments on commit 561b1f6

Please sign in to comment.