Skip to content

Commit 291fd76

Browse files
committed
Add navigation bar to New Order screen
1 parent 9faae06 commit 291fd76

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed
Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,40 @@
11
import SwiftUI
22

3+
/// View to create a new manual order
4+
///
35
struct NewOrder: View {
46
var body: some View {
57
ScrollView {
68
EmptyView()
79
}
810
.background(Color(.listBackground))
911
.ignoresSafeArea(.container, edges: [.horizontal, .bottom])
12+
.navigationTitle(Localization.title)
13+
.navigationBarTitleDisplayMode(.inline)
14+
.toolbar {
15+
ToolbarItem(placement: .confirmationAction) {
16+
Button(action: {
17+
// TODO-5405 - Add create order action
18+
}, label: {
19+
Text(Localization.createButton)
20+
})
21+
}
22+
}
23+
}
24+
}
25+
26+
// MARK: Constants
27+
private extension NewOrder {
28+
enum Localization {
29+
static let title = NSLocalizedString("New Order", comment: "Title for the order creation screen")
30+
static let createButton = NSLocalizedString("Create", comment: "Button to create an order on the New Order screen")
1031
}
1132
}
1233

1334
struct NewOrder_Previews: PreviewProvider {
1435
static var previews: some View {
15-
NewOrder()
36+
NavigationView {
37+
NewOrder()
38+
}
1639
}
1740
}

0 commit comments

Comments
 (0)