Created
June 21, 2019 12:28
-
-
Save bestiosdeveloper/62fe224c293f0343f91b2fd6f32208ed to your computer and use it in GitHub Desktop.
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
import SwiftUI | |
struct NewsRowV : View { | |
let artical: Artical | |
var body: some View { | |
HStack { | |
Image("ic_news_placeholder") | |
.frame(width: 55.0, height: 41.0, alignment: Alignment.center) | |
.scaledToFit() | |
.clipped() | |
VStack(alignment: .leading) { | |
Text(artical.title) | |
.font(.headline) | |
Text(artical.description) | |
.font(.subheadline) | |
} | |
} | |
} | |
} | |
#if DEBUG | |
struct NewsRowV_Previews : PreviewProvider { | |
static var previews: some View { | |
NewsRowV(artical: Artical.getDefault()) | |
} | |
} | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment