35 lines
762 B
Swift
35 lines
762 B
Swift
//
|
|
// ClockToolbar.swift
|
|
// TheNoiseClock
|
|
//
|
|
// Created by Matt Bruce on 9/8/25.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
/// Component that handles the clock view toolbar and navigation
|
|
struct ClockToolbar: View {
|
|
|
|
// MARK: - Properties
|
|
let isDisplayMode: Bool
|
|
|
|
// MARK: - Body
|
|
var body: some View {
|
|
let isPad = UIDevice.current.userInterfaceIdiom == .pad
|
|
EmptyView()
|
|
.navigationTitle(isDisplayMode || isPad ? "" : "Clock")
|
|
.navigationBarTitleDisplayMode(.inline)
|
|
.navigationBarBackButtonHidden(isDisplayMode)
|
|
.toolbar(isDisplayMode ? .hidden : .automatic)
|
|
}
|
|
}
|
|
|
|
// MARK: - Preview
|
|
#Preview {
|
|
NavigationStack {
|
|
ClockToolbar(
|
|
isDisplayMode: false
|
|
)
|
|
}
|
|
}
|