41 lines
804 B
Swift
41 lines
804 B
Swift
//
|
|
// CueCardViewPresenter.swift
|
|
// OnCuePresenter Watch App
|
|
//
|
|
// Created by Pradyun Setti on 22/06/2024.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct CueCardViewPresenter: View {
|
|
let project: OCProject
|
|
|
|
var body: some View {
|
|
TabView() {
|
|
ForEach(project.cards ?? []) { card in
|
|
CueCardView(card: card)
|
|
}
|
|
}
|
|
.tabViewStyle(.carousel)
|
|
}
|
|
}
|
|
|
|
struct CueCardView: View {
|
|
let card: OCCard
|
|
|
|
var body: some View {
|
|
VStack(alignment: .leading) {
|
|
Text(card.content)
|
|
.foregroundColor(.primary)
|
|
.font(.system(size: 12))
|
|
.padding()
|
|
.frame(height: 550)
|
|
Spacer()
|
|
}
|
|
}
|
|
}
|
|
|
|
#Preview {
|
|
CueCardViewPresenter(project: PreviewData.project)
|
|
}
|