Add action sheet for adding feed resources

This commit is contained in:
Maurice Parker 2020-07-02 16:18:59 -05:00
parent 494bd85a37
commit c6bd4cd6e3

View File

@ -11,6 +11,11 @@ import SwiftUI
struct SidebarToolbar: View {
@State private var showSettings: Bool = false
@State private var showAddSheet: Bool = false
var addActionSheetButtons = [
Button(action: {}, label: { Text("Add Feed") })
]
var body: some View {
VStack {
@ -28,11 +33,23 @@ struct SidebarToolbar: View {
.font(.caption)
.foregroundColor(.secondary)
Spacer()
Button(action: {}, label: {
Button(action: {
showAddSheet = true
}, label: {
Image(systemName: "plus")
.font(.title3)
.foregroundColor(.accentColor)
}).help("Add")
})
.help("Add")
.actionSheet(isPresented: $showAddSheet) {
ActionSheet(title: Text("Add"), buttons: [
.cancel(),
.default(Text("Add Web Feed")),
.default(Text("Add Twitter Feed")),
.default(Text("Add Reddit Feed")),
.default(Text("Add Folder"))
])
}
}
.padding(.horizontal, 16)
.padding(.bottom, 12)