34 lines
858 B
Swift
34 lines
858 B
Swift
import SwiftUI
|
|
|
|
struct PublicationView: View {
|
|
|
|
let info: Publication
|
|
|
|
let borderSpacing: CGFloat
|
|
|
|
let borderWidth: CGFloat
|
|
|
|
var body: some View {
|
|
LeftBorderView(color: .accentColor, spacing: borderSpacing, borderWidth: borderWidth) {
|
|
VStack(alignment: .leading) {
|
|
Text(info.venue)
|
|
.font(.caption)
|
|
.foregroundColor(.secondary)
|
|
Text(info.title)
|
|
.font(.subheadline)
|
|
.fontWeight(.regular)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
struct PublicationView_Previews: PreviewProvider {
|
|
static var previews: some View {
|
|
PublicationView(info: .init(
|
|
venue: "My venue",
|
|
title: "The publication title"),
|
|
borderSpacing: 5,
|
|
borderWidth: 3)
|
|
}
|
|
}
|