mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user