Add a clear all button to recent searches

Lets users wipe their whole search history at once from the recent
searches section header, as per the designs.
This commit is contained in:
Stefan Ceriu
2026-09-29 14:56:45 +03:00
parent 50b38555b6
commit a78e4f0c2a
8 changed files with 34 additions and 10 deletions
@@ -209,8 +209,19 @@ struct SearchScreen: View {
}
}
} header: {
Text(UntranslatedL10n.screenSearchRecentSearches)
.compoundListSectionHeader()
HStack(spacing: 8) {
Text(UntranslatedL10n.screenSearchRecentSearches)
.compoundListSectionHeader()
Spacer()
// The compound text link style has no accent colour variant.
Button { context.send(viewAction: .clearBreadcrumbs) } label: {
Text(L10n.actionClearAll)
.font(.compound.bodyMDSemibold)
.foregroundStyle(.compound.textActionAccent)
}
}
}
}
.compoundList(.plain)