Skip to content

Commit

Permalink
Merge branch 'main' into feat/HCPSDKFIORIUIKIT-2700
Browse files Browse the repository at this point in the history
  • Loading branch information
dyongxu authored Nov 14, 2024
2 parents f6c270e + 335dbb4 commit a6af7f9
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Apps/Examples/Examples.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
3C180C282B858CF6007CE79A /* IllustratedMessageExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C180C272B858CF6007CE79A /* IllustratedMessageExample.swift */; };
3CC870962CB6F4F30081909C /* ToastMessageExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CC870952CB6F4F30081909C /* ToastMessageExample.swift */; };
3CD71F292CDB627300B037EB /* CheckoutIndicatorExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CD71F282CDB626900B037EB /* CheckoutIndicatorExample.swift */; };
3CDD6ECD2CE4277300DDAE7D /* CheckoutIndicatorModalExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CDD6ECC2CE4277300DDAE7D /* CheckoutIndicatorModalExample.swift */; };
55598FAD2CDDB4F6007CFFBB /* ValuePickerExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55598FAC2CDDB4F6007CFFBB /* ValuePickerExample.swift */; };
6432FFA02C5164F8008ECE89 /* SegmentedControlExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6432FF9F2C5164F8008ECE89 /* SegmentedControlExample.swift */; };
64905D072C6D13E20062AAD4 /* SwitchExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64905D062C6D13E20062AAD4 /* SwitchExample.swift */; };
Expand Down Expand Up @@ -246,6 +247,7 @@
3C180C272B858CF6007CE79A /* IllustratedMessageExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IllustratedMessageExample.swift; sourceTree = "<group>"; };
3CC870952CB6F4F30081909C /* ToastMessageExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ToastMessageExample.swift; sourceTree = "<group>"; };
3CD71F282CDB626900B037EB /* CheckoutIndicatorExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckoutIndicatorExample.swift; sourceTree = "<group>"; };
3CDD6ECC2CE4277300DDAE7D /* CheckoutIndicatorModalExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckoutIndicatorModalExample.swift; sourceTree = "<group>"; };
55598FAC2CDDB4F6007CFFBB /* ValuePickerExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ValuePickerExample.swift; sourceTree = "<group>"; };
6432FF9F2C5164F8008ECE89 /* SegmentedControlExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SegmentedControlExample.swift; sourceTree = "<group>"; };
64905D062C6D13E20062AAD4 /* SwitchExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwitchExample.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -539,6 +541,7 @@
isa = PBXGroup;
children = (
3CD71F282CDB626900B037EB /* CheckoutIndicatorExample.swift */,
3CDD6ECC2CE4277300DDAE7D /* CheckoutIndicatorModalExample.swift */,
);
path = CheckoutIndicator;
sourceTree = "<group>";
Expand Down Expand Up @@ -1203,6 +1206,7 @@
B846F94826815DE50085044B /* ContactItemRegularExamples.swift in Sources */,
9D00866A2BA8F6820004BE15 /* TextFieldFormViewExample.swift in Sources */,
878219C42BEE128E002FDFBC /* StepperViewExample.swift in Sources */,
3CDD6ECD2CE4277300DDAE7D /* CheckoutIndicatorModalExample.swift in Sources */,
3C180C282B858CF6007CE79A /* IllustratedMessageExample.swift in Sources */,
A65036942CC6365C0093086A /* LoadingIndicatorExample.swift in Sources */,
8AD9DFB425D49967007448EC /* ContactItemInitViewBuilderExample.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import FioriSwiftUICore
import SwiftUI

struct CheckoutIndicatorModalExample: View {
@State private var showModal = false

var body: some View {
Button("Show Modal") {
self.showModal.toggle()
}
.sheet(isPresented: self.$showModal) {
ModalView()
}
}
}

struct ModalView: View {
@Environment(\.dismiss) var dismiss
@State var displayState: DisplayState = .inProgress
var size = CGSize(width: 130, height: 130)

var body: some View {
VStack {
CheckoutIndicator(displayState: self.$displayState)
.frame(width: self.size.width, height: self.size.height)

Picker("Display State", selection: self.$displayState) {
Text(String("inProgress"))
.tag(DisplayState.inProgress)
Text(String("completed"))
.tag(DisplayState.completed)
Text(String("failed"))
.tag(DisplayState.failed)
}
.pickerStyle(.segmented)
.padding(.top, 20)
.frame(maxWidth: 300)

Button("Dismiss Modal") {
self.dismiss()
}
.padding(.top, 20)
}
}
}
6 changes: 6 additions & 0 deletions Apps/Examples/Examples/FioriSwiftUICore/CoreContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,12 @@ struct CoreContentView: View {
{
Text("Checkout Indicator")
}

NavigationLink(
destination: CheckoutIndicatorModalExample())
{
Text("Checkout Indicator Modal")
}
}

Section(header: Text("Navigation Bar")) {
Expand Down

0 comments on commit a6af7f9

Please sign in to comment.