-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: 🐛 step progress indicator alignment (#564)
- Loading branch information
1 parent
71bd6df
commit 79658a8
Showing
7 changed files
with
56 additions
and
39 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
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
30 changes: 30 additions & 0 deletions
30
Sources/FioriSwiftUICore/Views/StepProgressIndicator/StepItem.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,30 @@ | ||
import Foundation | ||
|
||
/// Step items data model for `StepProgressIndicator` with a default style. | ||
public struct StepItem: Identifiable { | ||
/// Step id. | ||
public var id = UUID().uuidString | ||
/// Step title. | ||
public var title: String? | ||
/// Step state. | ||
public var state: StepIndicatorState | ||
/// Sub-steps for this one. | ||
public var substeps: [StepItem] | ||
|
||
/// Convenience initialization for step tiem. | ||
/// - Parameters: | ||
/// - id: Step id. | ||
/// - title: Step title. | ||
/// - state: Step state. | ||
/// - children: Sub-steps for this one. | ||
public init(id: String = UUID().uuidString, | ||
title: String? = nil, | ||
state: StepIndicatorState = [], | ||
substeps: [StepItem] = []) | ||
{ | ||
self.id = id | ||
self.title = title | ||
self.state = state | ||
self.substeps = substeps | ||
} | ||
} |
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