wip
This commit is contained in:
@@ -1,71 +0,0 @@
|
||||
//
|
||||
// OnboardingTime.swift
|
||||
// Feels (iOS)
|
||||
//
|
||||
// Created by Trey Tartt on 1/20/22.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct OnboardingTime: View {
|
||||
@ObservedObject var onboardingData: OnboardingData
|
||||
|
||||
var formatter: DateFormatter {
|
||||
let dateFormatter = DateFormatter()
|
||||
dateFormatter.timeStyle = .short
|
||||
return dateFormatter
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
GeometryReader { geometry in
|
||||
VStack(alignment: .leading) {
|
||||
Spacer()
|
||||
Image("horrible", bundle: .main)
|
||||
.foregroundColor(Color(UIColor.darkText))
|
||||
.opacity(0.04)
|
||||
.scaleEffect(1.2, anchor: .trailing)
|
||||
Spacer()
|
||||
}
|
||||
|
||||
|
||||
ScrollView {
|
||||
Text(String(localized: "onboarding_time_title"))
|
||||
.font(.title)
|
||||
.padding()
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.foregroundColor(Color(UIColor.white))
|
||||
|
||||
DatePicker("", selection: $onboardingData.date,
|
||||
displayedComponents: .hourAndMinute)
|
||||
.scaleEffect(2)
|
||||
.labelsHidden()
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
.padding()
|
||||
.padding([.top, .bottom], 25)
|
||||
.colorScheme(.dark)
|
||||
|
||||
Text(String(format: String(localized: "onboarding_time_body"),
|
||||
formatter.string(from: onboardingData.date)))
|
||||
.font(.title3)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.padding()
|
||||
.foregroundColor(Color(UIColor.white))
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
}
|
||||
.background(Color(hex: "ff453a"))
|
||||
}
|
||||
}
|
||||
|
||||
struct OnboardingTime_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
Group {
|
||||
OnboardingTime(onboardingData: OnboardingData())
|
||||
|
||||
OnboardingTime(onboardingData: OnboardingData())
|
||||
.preferredColorScheme(.dark)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user