From ecdea1de2f780dd1f8ac7ed04d77f1ddd765dc3e Mon Sep 17 00:00:00 2001 From: oliverhnat Date: Fri, 3 May 2024 22:09:37 +0200 Subject: [PATCH] Add add button to list view for decks and edit to toolbar --- WordAX/Views/Deck/DeckListView.swift | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/WordAX/Views/Deck/DeckListView.swift b/WordAX/Views/Deck/DeckListView.swift index 6e245d9..cd841ad 100644 --- a/WordAX/Views/Deck/DeckListView.swift +++ b/WordAX/Views/Deck/DeckListView.swift @@ -15,6 +15,14 @@ struct DeckListView: View { var body: some View { NavigationStack { List { + Button(action: { + self.addDeck = true + }) { + HStack { + Image(systemName: "plus.circle.fill") + Text("Add new deck") + } + } ForEach(decks) { deck in NavigationLink { FlashCardListView(deck: deck) @@ -37,11 +45,7 @@ struct DeckListView: View { } .toolbar { ToolbarItemGroup(placement: .topBarTrailing) { - Button(action: { - self.addDeck = true - }) { - Image(systemName: "plus") - } + EditButton() } } .navigationTitle("All decks")