diff --git a/Sources/Xcore/SwiftUI/Components/DynamicTextField/TextField/Styles/DynamicTextFieldStyle+Prominent.swift b/Sources/Xcore/SwiftUI/Components/DynamicTextField/TextField/Styles/DynamicTextFieldStyle+Prominent.swift index 2863ee655..b73047f3f 100644 --- a/Sources/Xcore/SwiftUI/Components/DynamicTextField/TextField/Styles/DynamicTextFieldStyle+Prominent.swift +++ b/Sources/Xcore/SwiftUI/Components/DynamicTextField/TextField/Styles/DynamicTextFieldStyle+Prominent.swift @@ -140,7 +140,7 @@ extension DynamicTextFieldStyle where Self == ProminentDynamicTextFieldStyle Self { prominent( prominence, - shape: RoundedRectangle(cornerRadius: cornerRadius, style: .continuous), + shape: .rect(cornerRadius: cornerRadius), padding: padding ) } diff --git a/Sources/Xcore/SwiftUI/Extensions/View+Border.swift b/Sources/Xcore/SwiftUI/Extensions/View+Border.swift index a7c7aabdb..ba940ec82 100644 --- a/Sources/Xcore/SwiftUI/Extensions/View+Border.swift +++ b/Sources/Xcore/SwiftUI/Extensions/View+Border.swift @@ -21,8 +21,7 @@ extension View { lineWidth: CGFloat = .onePixel, color: Color? = nil ) -> some View { - border( - RoundedRectangle(cornerRadius: cornerRadius, style: .continuous), + border(.rect(cornerRadius: cornerRadius), lineWidth: lineWidth, color: color ) diff --git a/Sources/Xcore/SwiftUI/Extensions/View+MaskInvert.swift b/Sources/Xcore/SwiftUI/Extensions/View+MaskInvert.swift index 31b6734a6..9d208804f 100644 --- a/Sources/Xcore/SwiftUI/Extensions/View+MaskInvert.swift +++ b/Sources/Xcore/SwiftUI/Extensions/View+MaskInvert.swift @@ -34,7 +34,7 @@ extension View { /// /// ``` /// Rectangle() - /// .maskInvert(Circle(), size: CGSize(width: 200, height: 100)) + /// .maskInvert(.circle, size: CGSize(width: 200, height: 100)) /// .ignoresSafeArea() /// ``` public func maskInvert(_ shape: S, size: CGSize) -> some View { @@ -76,8 +76,6 @@ private struct InvertedShape: Shape { } func path(in rect: CGRect) -> Path { - var path = Rectangle().path(in: rect) - let innerRect: CGRect switch dimension { @@ -91,8 +89,8 @@ private struct InvertedShape: Shape { innerRect = rect.inset(by: .init(lineWidth)) } + var path = Rectangle().path(in: rect) path.addPath(shape.path(in: innerRect)) - return path } }