Created
April 22, 2020 10:11
-
-
Save mattrighetti/1346da5e4bffb5f144a2888e63e5a94d to your computer and use it in GitHub Desktop.
Pill like component for RowCard View
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 CategoryPill: View { | |
var categoryName: String | |
var fontSize: CGFloat = 12.0 | |
var body: some View { | |
ZStack { | |
Text(categoryName) | |
.font(.system(size: fontSize, weight: .regular)) | |
.lineLimit(2) | |
.foregroundColor(.white) | |
.padding(5) | |
.background(Color.green) | |
.cornerRadius(5) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment