Last active
July 8, 2021 14:54
-
-
Save Toni77777/4ca5f92c43ce3efbecf8edae0c335d58 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
struct EmptyDataModifier<Placeholder: View>: ViewModifier { | |
let items: [Any] | |
let placeholder: Placeholder | |
@ViewBuilder | |
func body(content: Content) -> some View { | |
if !items.isEmpty { | |
content | |
} else { | |
placeholder | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment