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.
36 lines
770 B
36 lines
770 B
//
|
|
// AlarmDialView.swift
|
|
// LeCountdown
|
|
//
|
|
// Created by Laurent Morvillier on 01/02/2023.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct AlarmDialView: View {
|
|
|
|
@ObservedObject var alarm: Alarm
|
|
|
|
var body: some View {
|
|
|
|
HStack {
|
|
|
|
VStack {
|
|
Text(alarm.activity?.name?.uppercased() ?? "")
|
|
if let fireDate = alarm.fireDate {
|
|
Text(fireDate, style: .time)
|
|
}
|
|
Spacer()
|
|
}
|
|
Spacer()
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
struct AlarmDialView_Previews: PreviewProvider {
|
|
static var previews: some View {
|
|
AlarmDialView(alarm: Alarm.fake(context: PersistenceController.preview.container.viewContext))
|
|
.background(.cyan)
|
|
}
|
|
}
|
|
|