Skip to content

Instantly share code, notes, and snippets.

@BetterProgramming
Created May 25, 2022 02:28
struct Show: ViewModifier {
let isVisible: Bool
@ViewBuilder
func body(content: Content) -> some View {
if isVisible {
content
} else {
content.hidden()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment