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 af561442ee
commit 444acc1157
217 changed files with 443 additions and 433 deletions
@@ -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 {