Add Close button for macOS and update Done to Close in toolbar
Seto Elkahfi committed
May 15, 2026 at 12:31 UTC
548c8e8086c672da56b12190aa93ab364c578e80
1 file changed
+13
-1
Klepon/Features/Ask/AskSheetView.swift
+13
-1
@@ -27,6 +27,17 @@ struct AskSheetView: View {
27
var body: some View {
28
ScrollView {
29
VStack(alignment: .leading, spacing: 20) {
30
+ #if os(macOS)
31
+ HStack {
32
+ Spacer()
33
+
34
+ Button("Close") {
35
+ dismiss()
36
+ }
37
+ .keyboardShortcut(.cancelAction)
38
+ }
39
+ #endif
40
+
41
KleponCard {
42
VStack(alignment: .leading, spacing: 12) {
43
Text("Ask privately about \(entry.title)")
@@ -161,9 +172,10 @@ struct AskSheetView: View {
172
.kleponInlineNavigationTitle()
173
.toolbar {
174
ToolbarItem(placement: .kleponPrimaryAction) {
164
- Button("Done") {
175
+ Button("Close") {
176
dismiss()
177
}
178
+ .keyboardShortcut(.cancelAction)
179
.tint(KleponColor.accent)
180
}
181
}