Skip to content

Instantly share code, notes, and snippets.

@bestiosdeveloper
Created June 21, 2019 12:28
Show Gist options
  • Save bestiosdeveloper/62fe224c293f0343f91b2fd6f32208ed to your computer and use it in GitHub Desktop.
Save bestiosdeveloper/62fe224c293f0343f91b2fd6f32208ed to your computer and use it in GitHub Desktop.
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