Skip to content

Commit

Permalink
fix: 🐛 step progress indicator styles (#775)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyu0722 authored Aug 15, 2024
1 parent dda6540 commit 01b43e4
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import FioriSwiftUICore
import FioriThemeManager
import SwiftUI

struct StepProgressIndicatorExample: View {
Expand Down Expand Up @@ -121,7 +122,10 @@ struct SPIExampleWithHeader: View {
Button {} label: {
HStack(spacing: 2) {
Text("All Steps(\(self.steps.count)")
Image(systemName: "chevron.right")
.foregroundStyle(Color.preferredColor(.tintColor))
FioriIcon.actions.slimArrowRight
.font(.fiori(forTextStyle: .subheadline, weight: .semibold))
.foregroundStyle(Color.preferredColor(.separator))
}
}
}
Expand Down Expand Up @@ -210,8 +214,11 @@ struct SPIExampleWithoutName: View {
stepItems: self.steps) {} action: {
Button {} label: {
HStack(spacing: 2) {
Text("All Steps(\(self.steps.count))")
Image(systemName: "chevron.right")
Text("All Steps(\(self.steps.count)")
.foregroundStyle(Color.preferredColor(.tintColor))
FioriIcon.actions.slimArrowRight
.font(.fiori(forTextStyle: .subheadline, weight: .semibold))
.foregroundStyle(Color.preferredColor(.separator))
}
}
}
Expand Down Expand Up @@ -250,7 +257,10 @@ struct SPIExampleByBuilder: View {
Button {} label: {
HStack(spacing: 2) {
Text("All Steps(2)")
Image(systemName: "chevron.right")
.foregroundStyle(Color.preferredColor(.tintColor))
FioriIcon.actions.slimArrowRight
.font(.fiori(forTextStyle: .subheadline, weight: .semibold))
.foregroundStyle(Color.preferredColor(.separator))
}
}
}, steps: {
Expand Down Expand Up @@ -332,7 +342,10 @@ struct SPICustomStyleExample: View {
Button {} label: {
HStack(spacing: 2) {
Text("All Steps(\(self.steps.count)")
Image(systemName: "chevron.right")
.foregroundStyle(Color.preferredColor(.tintColor))
FioriIcon.actions.slimArrowRight
.font(.fiori(forTextStyle: .subheadline, weight: .semibold))
.foregroundStyle(Color.preferredColor(.separator))
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ extension StepProgressIndicator: View {
} else {
HStack(alignment: .center) {
title
.font(.fiori(forTextStyle: .headline, weight: .semibold))
Spacer()
action
.onSimultaneousTapGesture(perform: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ struct DefaultStepStyle: StepStyle {
case (.normal, true):
return Color.preferredColor(isPressed ? .tintColorTapState : .tintColor)
case (.completed, _):
return Color.preferredColor(.primaryFill)
return Color.preferredColor(.quinaryLabel)
case (.error, _):
return Color.preferredColor(isPressed ? .negativeLabelTapState : .negativeLabel)
default:
Expand Down

0 comments on commit 01b43e4

Please sign in to comment.