Update Compound's List header style to match our iOS 26 components. (#4797)

* Update Compound's list header font for iOS 26.

* Update the preview snapshots.

* Update UI test snapshots.
This commit is contained in:
Doug
2025-11-28 14:31:31 +00:00
committed by GitHub
parent 8f10fdb8ad
commit 2070ae4353
217 changed files with 443 additions and 433 deletions

View File

@@ -18,7 +18,7 @@ public extension View {
/// Styles a list section header using the Compound design tokens.
func compoundListSectionHeader() -> some View {
font(.compound.bodySM)
font(headerFont)
.foregroundColor(.compound.textSecondary)
.listRowInsets(EdgeInsets(top: 15,
leading: ListRowPadding.horizontal,
@@ -35,6 +35,16 @@ public extension View {
bottom: 10,
trailing: ListRowPadding.horizontal))
}
// MARK: - Private
private var headerFont: Font {
if #available(iOS 26.0, *) {
.compound.bodyMDSemibold
} else {
.compound.bodySM
}
}
}
struct ListTextStyles_Previews: PreviewProvider, TestablePreview {

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2f1656e9b8e951ef999b31940dace699ef28b0322ca119dc19bf9a47e1fe1933
size 106642
oid sha256:c19e995f5430c6500c39b4168c846e26a1f8f513145e8763f7e35d48a547bfa7
size 107410

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:65c27529b9aa1a5eb7a0f0da9e053a8f09af50019428e040d6ee27a91b1e08ad
size 59424
oid sha256:5c313efa4047eccbb4704eca6484d20b785c7295e9985a99df4d785ea72c47a2
size 60459

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bc4527662ef00800d2fe644b4d02c8af4b3fd95ea68139309c9dc8e18a5dd2b1
size 87597
oid sha256:73897c51ab37e100f7401081db7396cfac3cd28ba0865e8062e5d57383fee027
size 88061

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:92da62ffd1476a1d795db7462c16c3f52f4aa5615fd1517ae91225bf6710ffaf
size 40986
oid sha256:3df150bf9d033b4d21d37697effcf83435cfd3edb1ffb8b38ad4059e51b7707e
size 41444

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:72d36ddf21854d317e87a7285299b5b75652e53e6c09e1c62d1dcd6dd00bc9ef
size 96821
oid sha256:52b0b5c578893f606abb9159e85d0723a45b3d94c95e3b488682a3cf7e426b33
size 98119

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7b34a1ae4c75e0fbf789ccd2c7abc84a59679e39e975fb128814bcce12f492c6
size 48821
oid sha256:b5ad0f284dd5fa6368731483a4eef857d32697f2602f2c6d71820c60147d6262
size 49573