more fixes and preview tests updated

This commit is contained in:
Mauro Romito
2025-09-11 19:03:29 +02:00
committed by Stefan Ceriu
parent 89a8c2850a
commit 78c3ea9696
1007 changed files with 2042 additions and 2018 deletions
@@ -46,11 +46,23 @@ struct EditRoomAddressListRow: View {
}
private extension View {
func errorBackground(_ shouldDisplay: Bool) -> some View {
listRowBackground(shouldDisplay ? AnyView(RoundedRectangle(cornerRadius: 10)
@ViewBuilder
private var shape: some View {
if #available(iOS 26, *) {
Capsule()
.inset(by: 1)
.fill(.compound.bgCriticalSubtleHovered)
.stroke(Color.compound.borderCriticalPrimary)) : AnyView(Color.compound.bgCanvasDefaultLevel1))
.stroke(Color.compound.borderCriticalPrimary)
} else {
RoundedRectangle(cornerRadius: 10)
.inset(by: 1)
.fill(.compound.bgCriticalSubtleHovered)
.stroke(Color.compound.borderCriticalPrimary)
}
}
func errorBackground(_ shouldDisplay: Bool) -> some View {
listRowBackground(shouldDisplay ? AnyView(shape) : AnyView(Color.compound.bgCanvasDefaultLevel1))
}
}