Created
June 19, 2022 21:08
-
-
Save hmlongco/70a52bb62531856069718b5c79cf9fdd to your computer and use it in GitHub Desktop.
Builder: NameValueView
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct NameValueView: ViewBuilder { | |
let name: String? | |
let value: String? | |
var body: View { | |
HStackView { | |
LabelView(name) | |
.color(.secondaryLabel) | |
SpacerView() | |
LabelView(value) | |
.alignment(.right) | |
} | |
.spacing(4) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment