// // DefaultView.swift // LeCountdown // // Created by Laurent Morvillier on 17/02/2023. // import SwiftUI import WidgetKit struct DefaultView: View { @Environment(\.widgetFamily) var family: WidgetFamily var body: some View { Group { switch family { case .accessoryCorner, .accessoryCircular, .accessoryRectangular, .accessoryInline: VStack { Text("Configure me!").monospaced() } default: VStack { Text("Configure me!\n") Text("Tea".uppercased()).monospaced() Text("4:00").monospaced() } // .frame(maxWidth: .infinity, maxHeight: .infinity) } } .frame(maxWidth: .infinity, maxHeight: .infinity) .background(.black.opacity(0.5)) .foregroundColor(.white) // .background(Color.white.opacity(0.5)) } } struct DefaultView_Previews: PreviewProvider { static var previews: some View { DefaultView().previewContext(WidgetPreviewContext(family: .systemSmall)) } }