Created
June 22, 2021 22:34
-
-
Save barefeettom/679e4cbfef04dd23320e0103c6c91bec to your computer and use it in GitHub Desktop.
Part of the tutorial "Build an App Like Lego, with SwiftUI" https://medium.com/p/184fda9d0c86/
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 ProductCell: View { | |
var body: some View { | |
HStack { | |
Image(systemName: "photo") | |
.resizable(resizingMode: .stretch) | |
.aspectRatio(contentMode: .fit) | |
.frame(width: 60.0) | |
VStack(alignment: .leading) { | |
Text("Text") | |
.font(.title2) | |
.fontWeight(.bold) | |
Text("Detail Text") | |
.foregroundColor(Color.gray) | |
Text("Tertiary Text") | |
} | |
} | |
} | |
} | |
struct ProductCell_Previews: PreviewProvider { | |
static var previews: some View { | |
ProductCell() | |
.previewLayout(.sizeThatFits) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment