Skip to content

Commit

Permalink
public init for new toast content
Browse files Browse the repository at this point in the history
  • Loading branch information
josephjoeljo committed Aug 25, 2024
1 parent bcd2c51 commit 2e21bd2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Sources/SwiftToast/Models.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,9 @@ public enum DisplayPosition {
public struct ToastContent {
let view: () -> any View
let url: URL?

public init(view: @escaping () -> any View, url: URL?=nil) {
self.view = view
self.url = url
}
}

0 comments on commit 2e21bd2

Please sign in to comment.