File tree 1 file changed +20
-23
lines changed
Example/SnabblePayExample/Views
1 file changed +20
-23
lines changed Original file line number Diff line number Diff line change @@ -33,32 +33,19 @@ struct AccountView: View {
33
33
BackgroundView ( )
34
34
VStack ( spacing: 16 ) {
35
35
Spacer ( )
36
- CardView ( model: viewModel, expand: true )
37
- AccountStateView ( viewModel: viewModel)
38
- Spacer ( )
39
- Button {
40
- name = viewModel. customName
41
- edit. toggle ( )
42
- } label: {
43
- HStack {
44
- Image ( systemName: " pencil " )
45
- Text ( " Edit name " )
46
- }
47
- . padding ( . horizontal, 24 )
48
- . padding ( . vertical, 8 )
49
- . overlay (
50
- RoundedRectangle ( cornerRadius: 20 )
51
- . stroke ( Color . white, lineWidth: 2 )
52
- )
53
- }
54
- Button {
55
- delete. toggle ( )
56
- } label: {
57
- HStack {
36
+ ZStack ( alignment: . topTrailing) {
37
+ CardView ( model: viewModel, expand: true )
38
+ Button ( action: {
39
+ delete. toggle ( )
40
+ } ) {
58
41
Image ( systemName: " trash " )
59
- Text ( " Delete account " )
42
+ . foregroundColor ( Color . black )
60
43
}
44
+ . padding ( . trailing, 30 )
45
+ . padding ( . top, 10 )
61
46
}
47
+ AccountStateView ( viewModel: viewModel)
48
+ Spacer ( )
62
49
}
63
50
. onAppear {
64
51
viewModel. createMandate ( )
@@ -84,6 +71,16 @@ struct AccountView: View {
84
71
self . presentationMode. wrappedValue. dismiss ( )
85
72
}
86
73
}
74
+ . toolbar {
75
+ ToolbarItem ( placement: . navigationBarTrailing) {
76
+ Button ( action: {
77
+ name = viewModel. customName
78
+ edit. toggle ( )
79
+ } ) {
80
+ Image ( systemName: " square.and.pencil " )
81
+ }
82
+ }
83
+ }
87
84
}
88
85
89
86
func submit( ) {
You can’t perform that action at this time.
0 commit comments