You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
LeCountdown/LaunchWidget/CountdownView.swift

29 lines
509 B

//
// CountdownView.swift
// LeCountdown
//
// Created by Laurent Morvillier on 25/01/2023.
//
import SwiftUI
struct CountdownView: View {
var name: String?
var duration: Double
var body: some View {
VStack {
Text(name ?? "")
Text(duration.minuteSecond)
}
.font(.title2)
}
}
struct CountdownView_Previews: PreviewProvider {
static var previews: some View {
CountdownView(name: "Tea", duration: 3 * 60.0)
}
}