BezelNotification icon indicating copy to clipboard operation
BezelNotification copied to clipboard

Add SwiftUI support

Open KyNorthstar opened this issue 2 years ago • 2 comments
trafficstars

A new rethinking of the API will be needed. Input and suggestions are welcome!

KyNorthstar avatar Jun 26 '23 21:06 KyNorthstar

I think extending SwiftUI components to allow using the toasts would be decent, ie. buttons and pickers, toggles, that kinda stuff can be extended to behavior of something along the lines of this, where the specified action, such as clicking the button, toggling the toggle, selecting a picker item, easily triggers a confirmation notification

Button("hello") {
     print("pog")
}.bezelToast(message: "wow", icon: .pogIcon)

castdrian avatar Jul 23 '23 12:07 castdrian

I like that idea, @castdrian! Any thoughts on how it would know when to show the toast?

KyNorthstar avatar Jul 27 '23 05:07 KyNorthstar