Skip to content

Instantly share code, notes, and snippets.

@laevandus
Last active January 16, 2023 16:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laevandus/108e05f9c0387629a14fcda0fb81a145 to your computer and use it in GitHub Desktop.
Save laevandus/108e05f9c0387629a14fcda0fb81a145 to your computer and use it in GitHub Desktop.
func sheet<Content>(
isPresented: Binding<Bool>,
onDismiss: (() -> Void)? = nil,
content: @escaping () -> Content
) -> some View where Content : View
func sheet<Item, Content>(
item: Binding<Item?>,
onDismiss: (() -> Void)? = nil,
content: @escaping (Item) -> Content
) -> some View where Item : Identifiable, Content : View
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment