Tweak the design of various Forms to match Figma (#573)

Add formBackground and formRowBackground colours and adopt them.

* Include topic in UI tests.
This commit is contained in:
Doug
2023-02-14 10:14:13 +00:00
committed by GitHub
parent 7ab64d4cb4
commit b2d99e27a5
21 changed files with 156 additions and 143 deletions
@@ -81,6 +81,26 @@ public struct ElementColors {
collection.userInterfaceStyle == .light ? .element.systemGray6 : .element.system
})
}
/// The colour to use on the background of a Form or grouped List.
///
/// This colour is a special case as it uses `system` in light mode and `background` in dark mode.
public var formBackground: Color {
Color(UIColor { collection in
// Note: Light colour doesn't currently match Figma.
collection.userInterfaceStyle == .light ? .element.system : .element.background
})
}
/// The background colour of a row in a Form or grouped List.
///
/// This colour is a special case as it uses `background` in light mode and `system` in dark mode.
public var formRowBackground: Color {
Color(UIColor { collection in
// Note: Light colour doesn't currently match Figma.
collection.userInterfaceStyle == .light ? .element.background : .element.system
})
}
}
// MARK: UIKit