mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
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:
@@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user