comparison Simoleon/Helpers/ConditionalWrapper.swift @ 183:d2398f02e1ce

implement unit currency selector
author Dennis Concepcion Martin <dennisconcepcionmartin@gmail.com>
date Mon, 20 Dec 2021 12:28:16 +0100
parents
children
comparison
equal deleted inserted replaced
182:ba3ebe8cefe5 183:d2398f02e1ce
1 //
2 // ConditionalWrapper.swift
3 // Simoleon
4 //
5 // Created by Dennis Concepción Martín on 8/12/21.
6 //
7
8 import SwiftUI
9
10 extension View {
11 @ViewBuilder
12 func `if`<Content: View>(_ conditional: Bool, content: (Self) -> Content) -> some View {
13 if conditional {
14 content(self)
15 } else {
16 self
17 }
18 }
19 }