Created
September 6, 2022 09:46
-
-
Save alexandersandberg/62419bb5302405a537d954148ed697ed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public extension Spacer { | |
static func maxHeight(_ value: CGFloat) -> some View { | |
Spacer(minLength: 0) | |
.frame(maxHeight: value) | |
.layoutPriority(-1) | |
} | |
static func maxWidth(_ value: CGFloat) -> some View { | |
Spacer(minLength: 0) | |
.frame(maxWidth: value) | |
.layoutPriority(-1) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment