Design tweaks. (#3645)

* Update the background colour of the VisualList component.

* Update the recovery key field to match the designs.
This commit is contained in:
Doug
2024-12-20 14:13:23 +00:00
committed by GitHub
parent b8106f36ba
commit 885a5b9f36
16 changed files with 61 additions and 53 deletions
@@ -25,16 +25,10 @@ enum ListPosition {
}
struct VisualListItem<Icon: View>: View {
@Environment(\.backgroundStyle) private var backgroundStyle
let title: String
let position: ListPosition
let iconContent: () -> Icon
private var backgroundColor: AnyShapeStyle {
backgroundStyle ?? AnyShapeStyle(.compound.bgSubtleSecondary)
}
var body: some View {
Label { Text(title) } icon: {
iconContent()
@@ -43,7 +37,7 @@ struct VisualListItem<Icon: View>: View {
.padding(.horizontal, 16)
.padding(.vertical, 12)
.frame(maxWidth: .infinity, alignment: .leading)
.background(backgroundColor, in: RoundedCornerShape(radius: 14, corners: position.roundedCorners))
.background(.compound.bgSubtleSecondary, in: RoundedCornerShape(radius: 14, corners: position.roundedCorners))
}
}