Rename View+SideStore

This commit is contained in:
naturecodevoid
2023-02-22 12:19:07 -08:00
parent 3ea478ad05
commit 817d2de5e0

View File

@@ -0,0 +1,22 @@
//
// View+Hidden.swift
// SideStore
//
// Created by naturecodevoid on 2/18/23.
// Copyright © 2023 SideStore. All rights reserved.
//
import SwiftUI
// https://stackoverflow.com/a/59228385 (modified)
extension View {
@ViewBuilder func isHidden(_ hidden: Binding<Bool>, remove: Bool = false) -> some View {
if hidden.wrappedValue {
if !remove {
self.hidden()
}
} else {
self
}
}
}