Skip to content

Commit

Permalink
multiple toasts instances
Browse files Browse the repository at this point in the history
  • Loading branch information
GodGotzi committed Sep 24, 2024
1 parent bb73d91 commit 54cabd2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,17 @@ impl Toasts {
Self::default()
}

/// Create a new [`Toasts`] instance with a custom id
///
/// This can be useful if you want to have multiple toast groups
/// in the same UI.
pub fn with_id(id: Id) -> Self {
Self {
id,
..Default::default()
}
}

/// Position where the toasts show up.
///
/// The toasts will start from this position and stack up
Expand Down

0 comments on commit 54cabd2

Please sign in to comment.