// // PopoverModifier.swift // Recipes // // Created by Paul Kraft on 05.01.21. // import SwiftUI struct PopoverModifier: ViewModifier { // MARK: Stored Properties private let item: Binding private let destination: (Item) -> Destination // MARK: Initialization init(item: Binding, @ViewBuilder content: @escaping (Item) -> Destination) { self.item = item self.destination = content } // MARK: Methods func body(content: Content) -> some View { content.popover(item: item, content: destination) } }