Fix updating of page commands

This commit is contained in:
Christoph Hagen
2025-01-27 22:30:27 +01:00
parent e02bfd17d2
commit 89062f153c
7 changed files with 201 additions and 67 deletions

View File

@ -1,21 +1,4 @@
import SwiftUI
import SFSafeSymbols
private struct InsertableView<Command>: View where Command: InsertableCommand {
@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>()
}
}
}
struct InsertableItemsView: View {
@ -24,6 +7,7 @@ struct InsertableItemsView: View {
Text("Commands")
.font(.headline)
InsertableView<InsertableImage>()
InsertableView<InsertableLabels>()
}
}
}