Skip to content

Commit e15f69f

Browse files
authored
fix: direction of navigation link chevron in RTL mode for Design Toolbox (#553) (#567)
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
1 parent ffcdb70 commit e15f69f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2323

2424
### Fixed
2525

26+
- [DesignToolbox] Chevron for navigation link pointing to bad direction in RTL mode ([#553](https://github.com/Orange-OpenSource/ouds-ios/issues/553))
2627
- [DesignToolbox] Broken wording in radio button page
2728
- [DesignToolbox] Update Checkbox and Radio button assets on the screen of component list ([#519](https://github.com/Orange-OpenSource/ouds-ios/issues/519))
2829

DesignToolbox/DesignToolbox/Pages/Utils/Elements/DesignToolboxVariantElement.swift

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ struct DesignToolboxVariantElement: View {
1919

2020
@Environment(\.theme) private var theme
2121
@Environment(\.colorScheme) private var colorScheme
22+
@Environment(\.layoutDirection) private var layoutDirection
2223

2324
// MARK: Stored properties
2425

@@ -41,8 +42,9 @@ struct DesignToolboxVariantElement: View {
4142
Spacer()
4243
Image(systemName: "chevron.right")
4344
.foregroundColor(theme.colors.colorContentDefault.color(for: colorScheme))
44-
.padding(.trailing, theme.spaces.spaceFixedMedium)
45+
.padding(layoutDirection == .rightToLeft ? .leading : .trailing, theme.spaces.spaceFixedMedium)
4546
.accessibilityHidden(true)
47+
.scaleEffect(layoutDirection == .rightToLeft ? -1 : 1, anchor: .center)
4648
}
4749
}
4850
}

0 commit comments

Comments
 (0)