From dd88d9f1251fa150799629e3cdffbf550c58d1ca Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Fri, 7 Apr 2023 22:13:42 +0800 Subject: [PATCH] Use navigation view for setting note --- .../Article/HighlightAnnotationSheet.swift | 29 ++++++++++++------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/apple/OmnivoreKit/Sources/Views/Article/HighlightAnnotationSheet.swift b/apple/OmnivoreKit/Sources/Views/Article/HighlightAnnotationSheet.swift index 0371cf4d2..2c59dfa16 100644 --- a/apple/OmnivoreKit/Sources/Views/Article/HighlightAnnotationSheet.swift +++ b/apple/OmnivoreKit/Sources/Views/Article/HighlightAnnotationSheet.swift @@ -25,16 +25,16 @@ public struct HighlightAnnotationSheet: View { public var body: some View { VStack { - HStack { - Button(LocalText.cancelGeneric, action: onCancel) - Spacer() - Text("Note").font(Font.system(size: 14, weight: .medium)) - Spacer() - Button(LocalText.genericSave) { - onSave() - } - } - .foregroundColor(.appGrayTextContrast) +// HStack { +// Button(LocalText.cancelGeneric, action: onCancel) +// Spacer() +// Text("Note").font(Font.system(size: 18, weight: .bold)) +// Spacer() +// Button(LocalText.genericSave) { +// onSave() +// } +// } +// .foregroundColor(.appGrayTextContrast) ScrollView { TextEditor(text: $annotation) @@ -49,6 +49,15 @@ public struct HighlightAnnotationSheet: View { Spacer() } .padding() + .navigationTitle("Note") + .navigationBarTitleDisplayMode(.inline) + .navigationBarItems(leading: Button(action: onCancel, label: { + Text("Cancel") + })) + .navigationBarItems(trailing: Button(action: onSave, label: { + Text("Save").bold() + })) + .listStyle(PlainListStyle()) .alert(errorAlertMessage ?? LocalText.readerError, isPresented: $showErrorAlertMessage) { Button(LocalText.genericOk, role: .cancel, action: { errorAlertMessage = nil