Mercurial > public > simoleon
view Simoleon/Helpers/ConditionalWrapper.swift @ 171:70f0625bfcf1
Merge pull request #17 from denniscm190/development
open source project
committer: GitHub <noreply@github.com>
author | Dennis C. M. <dennis@denniscm.com> |
---|---|
date | Tue, 12 Oct 2021 16:17:35 +0200 |
parents | 75c1a05176f6 |
children |
line wrap: on
line source
// // ConditionalWrapper.swift // Simoleon // // Created by Dennis Concepción Martín on 19/07/2021. // import SwiftUI extension View { @ViewBuilder func `if`<Content: View>(_ conditional: Bool, content: (Self) -> Content) -> some View { if conditional { content(self) } else { self } } }