-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve compile error after fixing conflict
- Loading branch information
Showing
42 changed files
with
2,033 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
446 changes: 317 additions & 129 deletions
446
...amples/Examples/FioriSwiftUICore/StepProgressIndicator/StepProgressIndicatorExample.swift
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
Sources/FioriSwiftUICore/Views/StepProgressIndicator/StepsStack.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import SwiftUI | ||
|
||
struct StepsStack: View { | ||
var steps: [StepItem] | ||
var selection: Binding<String>? = nil | ||
/// :nodoc: | ||
init(_ steps: [StepItem], selection: Binding<String>? = nil) { | ||
self.steps = steps | ||
self.selection = selection | ||
} | ||
|
||
var body: some View { | ||
ForEach(0 ..< self.count, id: \.self) { index in | ||
self.view(at: index) | ||
} | ||
} | ||
} | ||
|
||
extension StepsStack: IndexedViewContainer { | ||
/// :nodoc: | ||
public var count: Int { | ||
self.steps.count | ||
} | ||
|
||
/// :nodoc: | ||
@ViewBuilder public func view(at index: Int) -> some View { | ||
if index < self.count { | ||
_DefaultSteps(stepItems: self.steps, selection: self.selection ?? .constant("")).view(at: index) | ||
} else { | ||
EmptyView() | ||
} | ||
} | ||
|
||
@ViewBuilder func titleView(for title: String?) -> some View { | ||
if let title { | ||
Text(title) | ||
} else { | ||
EmptyView() | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.