taler-ios

iOS apps for GNU Taler (wallet)
Log | Files | Refs | README | LICENSE

commit c3994d1d4597a7a183203230eccd9a035af7cecc
parent 8bcf88fd27528950b5ecc95cf0414ee8b10fc924
Author: Marc Stibane <marc@taler.net>
Date:   Thu, 24 Apr 2025 10:44:00 +0200

OIMactionButtons

Diffstat:
ATalerWallet1/Views/OIM/OIMactionButtons.swift | 46++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+), 0 deletions(-)

diff --git a/TalerWallet1/Views/OIM/OIMactionButtons.swift b/TalerWallet1/Views/OIM/OIMactionButtons.swift @@ -0,0 +1,46 @@ +/* + * This file is part of GNU Taler, ©2022-25 Taler Systems S.A. + * See LICENSE.md + */ +/** + * @author Marc Stibane + */ +import SwiftUI + +struct OIMsendButton: View { + let isGoal: Bool + let enabled: Bool + let action: () -> Void + + var body: some View { + let imageName = isGoal ? "noun-football-goal-4935574" + : "SendTaler" + Button(action: action) { + Image(imageName) + .resizable() + .scaledToFit() +// .tint(WalletColors().talerColor) + .foregroundStyle(WalletColors().talerColor) + } + .opacity(enabled ? 1.0 : 0.3) + .disabled(!enabled) + } +} + +struct OIMbalanceButton: View { + let isOpen: Bool + let tint: Bool + let action: () -> Void + + var body: some View { + let imageName = isOpen ? "ChestOpen" : "ChestClosed" + Button(action: action) { + Image(imageName) + .resizable() + .scaledToFit() + .foregroundStyle(tint ? .brown + : WalletColors().talerColor) + } + } +} +