Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Oztechan/CCC#1441] Enable iOS SwiftUI Previews #1442

Draft
wants to merge 7 commits into
base: develop
Choose a base branch
from
20 changes: 17 additions & 3 deletions ios/CCC/UI/Slider/SlideView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ struct SlideView: View {

var body: some View {
ZStack {
Color(Res.colors().background_strong.get()).edgesIgnoringSafeArea(.all)
// Color(Res.colors().background_strong.get()).edgesIgnoringSafeArea(.all)
VStack {
Spacer()

Expand All @@ -31,7 +31,7 @@ struct SlideView: View {

image
.resize(widthAndHeight: 144.cp())
.accentColor(Res.colors().text.get())
// .accentColor(Res.colors().text.get())
.padding(4.cp())

Text(subTitle1)
Expand Down Expand Up @@ -59,11 +59,25 @@ struct SlideView: View {
label: {
Text(buttonText)
.font(relative: .body)
.foregroundColor(Res.colors().text.get())
// .foregroundColor(Res.colors().text.get())
}
).padding(top: 10.cp(), leading: 10.cp(), bottom: 15.cp(), trailing: 15.cp())
}
}
}
}
}

struct SlideViewPreviews: PreviewProvider {
static var previews: some View {
SlideView(
// title: MR.strings().slide_intro_title.get() // this doens't work too
title: "Test Title",
image: Image(systemName: "gear"),
subTitle1: "Subtitle 1",
subTitle2: "Subtitle 2",
buttonText: "Button",
buttonAction: {}
)
}
}