Skip to content

Commit 003b70f

Browse files
Ben LeggieroBen Leggiero
Ben Leggiero
authored and
Ben Leggiero
committed
Merge branch 'feature/56-Compiler-error-SwiftUI-previews'
2 parents 28d5ec8 + 162cb03 commit 003b70f

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

Sources/RectangleTools/Default Conformances/EdgeInsets + FourSided.swift

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ extension NSEdgeInsets: Equatable {}
8585

8686

8787

88-
#if canImport(SwiftUI)
88+
#if canImport(SwiftUI) && !RECTANGLETOOLS_EXCLUDE_SWIFTUI_EDGEINSETS
8989
import SwiftUI
9090

9191

@@ -94,7 +94,7 @@ import SwiftUI
9494
@available(iOS 13, *)
9595
@available(tvOS 13, *)
9696
@available(watchOS 6, *)
97-
extension SwiftUI.EdgeInsets: FourSidedAbsolute {
97+
extension EdgeInsets: FourSidedAbsolute {
9898
public init(top: CGFloat, right: CGFloat, bottom: CGFloat, left: CGFloat) {
9999
switch UserInterfaceLayoutDirection.current {
100100
case .leftToRight:
@@ -117,11 +117,8 @@ extension SwiftUI.EdgeInsets: FourSidedAbsolute {
117117

118118

119119

120-
@available(macOS 10.15, *)
121-
@available(iOS 13, *)
122-
@available(tvOS 13, *)
123-
@available(watchOS 6, *)
124-
public extension SwiftUI.EdgeInsets {
120+
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
121+
public extension EdgeInsets {
125122
/// The value of whichever edge inset is leading in the current app's UI direction
126123
var right: CGFloat {
127124
switch UserInterfaceLayoutDirection.current {

0 commit comments

Comments
 (0)