Skip to content

Commit 9715e34

Browse files
committed
previews added
Previews added
1 parent 0327068 commit 9715e34

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

GoInfoGame/GoInfoGame/UI/Utils/UndoButton.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ struct UndoButton: View {
9898
.padding(.vertical, 6)
9999
.background(Color.red)
100100
.cornerRadius(8)
101+
// .frame(width: 200)
101102
}
102103
}
103104
.padding()
@@ -110,4 +111,14 @@ struct UndoButton: View {
110111
}
111112
}
112113

114+
#Preview {
115+
UndoButton(onPreview: { id, type in
116+
117+
}, onRemovePreview: {
118+
119+
}, onRevert: { changesetid in
120+
121+
})
122+
}
123+
113124

GoInfoGame/GoInfoGame/UI/Utils/UndoSidebarView.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,15 @@ struct UndoSidebarView: View {
6363
.shadow(radius: 5)
6464
}
6565
}
66+
#Preview {
67+
UndoSidebarView(
68+
69+
onUndo: {_ in
70+
71+
},
72+
onClose: {},
73+
onItemSelected: {_ in })
74+
75+
}
6676

6777

0 commit comments

Comments
 (0)