41 lines
832 B
Swift
41 lines
832 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(PageTabViewStyle(indexDisplayMode: .always))
|
|
}
|
|
}
|
|
|
|
struct CueCardView: View {
|
|
let card: OCCard
|
|
|
|
var body: some View {
|
|
VStack(alignment: .leading) {
|
|
Text(card.content)
|
|
.foregroundColor(.primary)
|
|
.font(.system(size: 25))
|
|
.padding()
|
|
.frame(height: 550)
|
|
Spacer()
|
|
}
|
|
}
|
|
}
|
|
|
|
#Preview {
|
|
CueCardViewPresenter(project: PreviewData.project)
|
|
}
|