secant-ios-wallet/modules/Sources/UIComponents/Text/ConditionalFont.swift

21 lines
365 B
Swift

//
// ConditionalFont.swift
//
//
// Created by Lukáš Korba on 08.11.2023.
//
import SwiftUI
extension Text {
public func conditionalFont(condition: Bool, true: Font, else: Font) -> Text {
if condition {
return self
.font(`true`)
} else {
return self
.font(`else`)
}
}
}