We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e29399 commit e0569bdCopy full SHA for e0569bd
Sources/SwiftCrossUI/Views/Divider.swift
@@ -3,6 +3,7 @@
3
/// in light mode it's black with 10% opacity.
4
public struct Divider: View {
5
@Environment(\.colorScheme) var colorScheme
6
+ @Environment(\.layoutOrientation) var layoutOrientation
7
8
var color: Color {
9
switch colorScheme {
@@ -16,6 +17,9 @@ public struct Divider: View {
16
17
public init() {}
18
19
public var body: some View {
- color.frame(height: 1)
20
+ color.frame(
21
+ width: layoutOrientation == .horizontal ? 1 : nil,
22
+ height: layoutOrientation == .vertical ? 1 : nil
23
+ )
24
}
25
0 commit comments