Last active
March 3, 2020 23:54
-
-
Save jpmcglone/d31214ba582ce49a5e760c35b9676cdf 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 struct VSpacer: View { | |
private let spacing: CGFloat | |
public init(_ spacing: CGFloat) { | |
self.spacing = spacing | |
} | |
public var body: some View { | |
Spacer() | |
.frame(idealHeight: spacing, maxHeight: spacing) | |
} | |
} | |
public struct HSpacer: View { | |
private let spacing: CGFloat | |
public init(_ spacing: CGFloat) { | |
self.spacing = spacing | |
} | |
public var body: some View { | |
Spacer() | |
.frame(idealWidth: spacing, maxWidth: spacing) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment