Skip to content

Commit

Permalink
[#1441] Enable iOS SwiftUI Previews
Browse files Browse the repository at this point in the history
  • Loading branch information
mustafaozhan committed Dec 27, 2022
1 parent aba0c45 commit 6743602
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
19 changes: 16 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(MR.colors().background_strong.get()).edgesIgnoringSafeArea(.all)
// Color(MR.colors().background_strong.get()).edgesIgnoringSafeArea(.all)
VStack {

Spacer()
Expand All @@ -32,7 +32,7 @@ struct SlideView: View {

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

Text(subTitle1)
Expand Down Expand Up @@ -60,11 +60,24 @@ struct SlideView: View {
label: {
Text(buttonText)
.font(relative: .body)
.foregroundColor(MR.colors().text.get())
// .foregroundColor(MR.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: "Test Title",
image: Image(systemName: "gear"),
subTitle1: "Subtitle 1",
subTitle2: "Subtitle 2",
buttonText: "Button",
buttonAction: {}
)
}
}
1 change: 1 addition & 0 deletions res/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ kotlin {
}
framework {
baseName = Modules.RES.frameworkName
isStatic = true
}
}

Expand Down

0 comments on commit 6743602

Please sign in to comment.