2025-01-27 22:30:27 +01:00

18 lines
417 B
Swift

import SwiftUI
import SFSafeSymbols
struct InsertableView<Command>: View where Command: InsertableCommandView {
@State
private var showSheet: Bool = false
var body: some View {
Button(action: { showSheet = true }) {
Label(Command.title, systemSymbol: Command.icon)
}
.sheet(isPresented: $showSheet) {
InsertableCommandSheet<Command>()
}
}
}