TheNoiseClock/TheNoiseClock/Features/Clock/Views/Components/ClockOverlayContainer.swift

43 lines
1.2 KiB
Swift

//
// ClockOverlayContainer.swift
// TheNoiseClock
//
// Created by Matt Bruce on 9/8/25.
//
import SwiftUI
import Bedrock
/// Container component that handles the positioning and display of top overlays
struct ClockOverlayContainer: View {
// MARK: - Properties
let style: ClockStyle
// MARK: - Body
var body: some View {
VStack {
if style.showBattery || style.showDate || style.showNextAlarm || style.showNoiseControls {
TopOverlayView(
showBattery: style.showBattery,
showDate: style.showDate,
color: style.effectiveDigitColor,
opacity: style.clockOpacity,
dateFormat: style.dateFormat,
showNextAlarm: style.showNextAlarm,
showNoiseControls: style.showNoiseControls
)
.padding(.top, Design.Spacing.small)
.padding(.horizontal, Design.Spacing.large)
.transition(.opacity)
}
Spacer()
}
}
}
// MARK: - Preview
#Preview {
ClockOverlayContainer(style: ClockStyle())
}