Fix updating of page commands
This commit is contained in:
17
CHDataManagement/Views/Pages/Commands/InsertableView.swift
Normal file
17
CHDataManagement/Views/Pages/Commands/InsertableView.swift
Normal file
@@ -0,0 +1,17 @@
|
||||
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>()
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user