Created
January 9, 2021 09:47
-
-
Save dllewellyn/d336cc2076800e35fea7a4daec5d4046 to your computer and use it in GitHub Desktop.
ListViewItem.swift
This file contains hidden or 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 ListViewItem: View { | |
| var title : String | |
| var subtitle : String | |
| var imageUrl : String | |
| var body: some View { | |
| VStack(alignment: .leading, spacing: nil) { | |
| Text(title) | |
| .font(.title) | |
| Text(subtitle) | |
| .font(.subheadline) | |
| }.frame(minWidth: 0, maxWidth: .infinity, minHeight: 0, maxHeight: .none, alignment: .topLeading) | |
| } | |
| } | |
| struct ListViewItem_Previews: PreviewProvider { | |
| static var previews: some View { | |
| ListViewItem(title: "Test title", subtitle: "Test subtitle", imageUrl: "SampleImage") | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment