view LazyBear/Helpers/ConditionallyWrapView.swift @ 471:f6bb6fde1ff7 default tip

Move to mercurial
author Dennis C. M. <dennis@denniscm.com>
date Tue, 03 Jun 2025 15:05:50 +0100
parents 6953d83060a4
children
line wrap: on
line source

//
//  ConditionallyWrapView.swift
//  lazybear
//
//  Created by Dennis Concepción Martín on 17/07/2021.
//

import SwiftUI

extension View {
   @ViewBuilder
   func `if`<Content: View>(_ conditional: Bool, content: (Self) -> Content) -> some View {
        if conditional {
            content(self)
        } else {
            self
        }
    }
}