18 lines
417 B
Swift
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>()
|
|
}
|
|
}
|
|
}
|