commit 6fbad019bfbada93214ce88f3fa1a557d15a1274 parent 88c5ecb0f744bc21b3cf65f8822fde3af8cf40fb Author: Marc Stibane <marc@taler.net> Date: Sun, 30 Mar 2025 22:00:19 +0200 Back + Forward Diffstat:
| M | TalerWallet1/Views/HelperViews/Buttons.swift | | | 32 | ++++++++++++++++++++++++++++++++ |
1 file changed, 32 insertions(+), 0 deletions(-)
diff --git a/TalerWallet1/Views/HelperViews/Buttons.swift b/TalerWallet1/Views/HelperViews/Buttons.swift @@ -154,6 +154,38 @@ struct PlusButton : View { } } +struct BackButton : View { + let action: () -> Void + + var body: some View { + Button(action: action) { + Image(ICONNAME_INCOMING + ICONNAME_FILL) + } + .talerFont(.largeTitle) + .accessibilityLabel("Back") + } +} + +struct ForwardButton : View { + let enabled: Bool + let action: () -> Void + + var body: some View { + let myAction = { + if enabled { + action() + } + } + Button(action: myAction) { + let imageName = enabled ? ICONNAME_OUTGOING + ICONNAME_FILL + : ICONNAME_OUTGOING + Image(imageName) + } + .talerFont(.largeTitle) + .accessibilityLabel("Continue") + } +} + struct ArrowUpButton : View { let action: () -> Void