Skip to content

Instantly share code, notes, and snippets.

@barefeettom
Created June 22, 2021 22:34
Show Gist options
  • Save barefeettom/679e4cbfef04dd23320e0103c6c91bec to your computer and use it in GitHub Desktop.
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/
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