diff --git a/ios/PolkadotVault.xcodeproj/project.pbxproj b/ios/PolkadotVault.xcodeproj/project.pbxproj index e6c09571a4..9fab0465c5 100644 --- a/ios/PolkadotVault.xcodeproj/project.pbxproj +++ b/ios/PolkadotVault.xcodeproj/project.pbxproj @@ -270,10 +270,6 @@ 6DDD737C2940629D00F04CE7 /* LogsMoreActionsModal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DDD737B2940629D00F04CE7 /* LogsMoreActionsModal.swift */; }; 6DDEF13228AE6039004CA2FD /* signer.udl in Sources */ = {isa = PBXBuildFile; fileRef = 6DDEF12E28AE5EDA004CA2FD /* signer.udl */; }; 6DDEF13C28AE7A30004CA2FD /* ApplicationInformation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DDEF13B28AE7A30004CA2FD /* ApplicationInformation.swift */; }; - 6DDEF13F28AE7C57004CA2FD /* PrimaryButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DDEF13E28AE7C57004CA2FD /* PrimaryButton.swift */; }; - 6DDEF14328AE8794004CA2FD /* SecondaryButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DDEF14228AE8794004CA2FD /* SecondaryButton.swift */; }; - 6DDEF14528AE87A7004CA2FD /* EmptyButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DDEF14428AE87A7004CA2FD /* EmptyButton.swift */; }; - 6DDF439729878D0E00881AFF /* PaginatedScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DDF439629878D0E00881AFF /* PaginatedScrollView.swift */; }; 6DDF439C29879D3900881AFF /* SecondaryFont.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DDF439B29879D3900881AFF /* SecondaryFont.swift */; }; 6DDF439D2987A23B00881AFF /* Unbounded-Black.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6DDF439829879D1D00881AFF /* Unbounded-Black.ttf */; }; 6DDF439E2987A23E00881AFF /* Unbounded-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6DDF439A29879D1D00881AFF /* Unbounded-Bold.ttf */; }; @@ -619,10 +615,6 @@ 6DDEF13328AE6542004CA2FD /* signerFFI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = signerFFI.h; sourceTree = ""; }; 6DDEF13428AE6542004CA2FD /* signer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = signer.swift; sourceTree = ""; }; 6DDEF13B28AE7A30004CA2FD /* ApplicationInformation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ApplicationInformation.swift; sourceTree = ""; }; - 6DDEF13E28AE7C57004CA2FD /* PrimaryButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PrimaryButton.swift; sourceTree = ""; }; - 6DDEF14228AE8794004CA2FD /* SecondaryButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecondaryButton.swift; sourceTree = ""; }; - 6DDEF14428AE87A7004CA2FD /* EmptyButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmptyButton.swift; sourceTree = ""; }; - 6DDF439629878D0E00881AFF /* PaginatedScrollView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaginatedScrollView.swift; sourceTree = ""; }; 6DDF439829879D1D00881AFF /* Unbounded-Black.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Unbounded-Black.ttf"; sourceTree = ""; }; 6DDF439929879D1D00881AFF /* Unbounded-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Unbounded-Regular.ttf"; sourceTree = ""; }; 6DDF439A29879D1D00881AFF /* Unbounded-Bold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Unbounded-Bold.ttf"; sourceTree = ""; }; @@ -747,7 +739,6 @@ 2D7A7BC826BA97AE0053C1E0 /* Components */ = { isa = PBXGroup; children = ( - 6DDF439629878D0E00881AFF /* PaginatedScrollView.swift */, 6D749C5E2A69C5F00064D7E5 /* Identicons */, 6DEB18ED2A0BAFA60013995E /* Progress */, 6D10EACC297114550063FB71 /* DerivationPathComponents.swift */, @@ -1735,9 +1726,6 @@ 6DDEF13D28AE7C4B004CA2FD /* Buttons */ = { isa = PBXGroup; children = ( - 6DDEF13E28AE7C57004CA2FD /* PrimaryButton.swift */, - 6DDEF14228AE8794004CA2FD /* SecondaryButton.swift */, - 6DDEF14428AE87A7004CA2FD /* EmptyButton.swift */, 6D95E97228B4F42300E28A11 /* ActionButton.swift */, 6D932CDE292E05CB008AD883 /* InlineButton.swift */, 6DC5643C28B91EFE003D540B /* NavbarButton.swift */, @@ -2135,7 +2123,6 @@ 6D199CA2292A8EB300E79113 /* TransactionSummaryModels.swift in Sources */, 6D7129222952B7800048558C /* NetworkSettingsDetails.swift in Sources */, 2DA5F86327566C3600D8DD29 /* TCCall.swift in Sources */, - 6DDEF14328AE8794004CA2FD /* SecondaryButton.swift in Sources */, 6D0FA73B2907010E00E45BA6 /* ExportMultipleKeysModal+ViewModel.swift in Sources */, 6DC0FC98296695D000A45883 /* SeedKeysPreview+Helpers.swift in Sources */, 6D9921B7297FB471004891B6 /* PasswordProtectionStatePublisher.swift in Sources */, @@ -2238,13 +2225,11 @@ 6D16685728F530F4008C664A /* CaptureDeviceConfigurator.swift in Sources */, 6D5DCA032A7CFA2E0050B101 /* ExportKeysSelectionModal.swift in Sources */, 6D8045D928D0761E00237F8C /* QRCodeAddressFooterView.swift in Sources */, - 6DDEF14528AE87A7004CA2FD /* EmptyButton.swift in Sources */, 2DA5F8332756653B00D8DD29 /* CameraPreview.swift in Sources */, 6DDD737A29404E5000F04CE7 /* Event+EntryType.swift in Sources */, 6D932CDF292E05CB008AD883 /* InlineButton.swift in Sources */, 6D971AC72942465C00121A36 /* QrData+Helpers.swift in Sources */, 6DDD737C2940629D00F04CE7 /* LogsMoreActionsModal.swift in Sources */, - 6DDF439729878D0E00881AFF /* PaginatedScrollView.swift in Sources */, 6DA08B8E29B615390027CFCB /* RecoverKeySetNameView.swift in Sources */, 2DAA82A727885E73002917C0 /* TCNameValueTemplate.swift in Sources */, 6D5801E7289937C0006C41D8 /* ConnectivityMonitoringAssembler.swift in Sources */, @@ -2343,7 +2328,6 @@ 2DAA829D27885A67002917C0 /* TCMeta.swift in Sources */, 2DA5F86027566C3600D8DD29 /* TCAuthorPublicKey.swift in Sources */, 6D07D370292B40D2001A0B79 /* TransactionSummaryView.swift in Sources */, - 6DDEF13F28AE7C57004CA2FD /* PrimaryButton.swift in Sources */, 6D10EAC5296F16EE0063FB71 /* DerivationPathNameView.swift in Sources */, 6D4C0753289AC36100B2EE48 /* Fonts.swift in Sources */, 6D199C9F292A8D1100E79113 /* TransactionDetailsView.swift in Sources */, diff --git a/ios/PolkadotVault/Components/Buttons/ActionButton.swift b/ios/PolkadotVault/Components/Buttons/ActionButton.swift index 15e7fae19d..601cf4d1d9 100644 --- a/ios/PolkadotVault/Components/Buttons/ActionButton.swift +++ b/ios/PolkadotVault/Components/Buttons/ActionButton.swift @@ -72,7 +72,7 @@ struct ActionButton: View { private var style: ActionButtonStyle init( - action: @escaping @autoclosure () -> Void, + action: @escaping () -> Void, text: LocalizedStringKey, style: ActionButtonStyle ) { diff --git a/ios/PolkadotVault/Components/Buttons/EmptyButton.swift b/ios/PolkadotVault/Components/Buttons/EmptyButton.swift deleted file mode 100644 index b26a9c71fc..0000000000 --- a/ios/PolkadotVault/Components/Buttons/EmptyButton.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// EmptyButton.swift -// Polkadot Vault -// -// Created by Krzysztof Rodak on 19/08/2022. -// - -import SwiftUI - -struct EmptyButton: View { - private let action: () -> Void - private let text: LocalizedStringKey - private let style: ActionButtonStyle - - init( - action: @escaping @autoclosure () -> Void, - text: LocalizedStringKey, - style: ActionButtonStyle = .emptyPrimary() - ) { - self.action = action - self.text = text - self.style = style - } - - var body: some View { - ActionButton( - action: action(), - text: text, - style: style - ) - } -} diff --git a/ios/PolkadotVault/Components/Buttons/NavbarButton.swift b/ios/PolkadotVault/Components/Buttons/NavbarButton.swift index 8bd1c75631..ddea86c100 100644 --- a/ios/PolkadotVault/Components/Buttons/NavbarButton.swift +++ b/ios/PolkadotVault/Components/Buttons/NavbarButton.swift @@ -22,7 +22,6 @@ struct NavbarButtonStyle: ButtonStyle { struct NavbarButton: View { private let action: () -> Void private let icon: Image - @State var isDisabled: Bool init( diff --git a/ios/PolkadotVault/Components/Buttons/PrimaryButton.swift b/ios/PolkadotVault/Components/Buttons/PrimaryButton.swift deleted file mode 100644 index f45f2b9e95..0000000000 --- a/ios/PolkadotVault/Components/Buttons/PrimaryButton.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// PrimaryButton.swift -// Polkadot Vault -// -// Created by Krzysztof Rodak on 19/08/2022. -// - -import SwiftUI - -struct PrimaryButton: View { - private let action: () -> Void - private let text: LocalizedStringKey - private let style: ActionButtonStyle - - init( - action: @escaping () -> Void, - text: LocalizedStringKey, - style: ActionButtonStyle = .primary() - ) { - self.action = action - self.text = text - self.style = style - } - - var body: some View { - ActionButton( - action: action(), - text: text, - style: style - ) - } -} diff --git a/ios/PolkadotVault/Components/Buttons/SecondaryButton.swift b/ios/PolkadotVault/Components/Buttons/SecondaryButton.swift deleted file mode 100644 index f029106231..0000000000 --- a/ios/PolkadotVault/Components/Buttons/SecondaryButton.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// SecondaryButton.swift -// Polkadot Vault -// -// Created by Krzysztof Rodak on 19/08/2022. -// - -import SwiftUI - -struct SecondaryButton: View { - private let action: () -> Void - private let text: LocalizedStringKey - private let style: ActionButtonStyle - - init( - action: @escaping @autoclosure () -> Void, - text: LocalizedStringKey, - style: ActionButtonStyle = .secondary() - ) { - self.action = action - self.text = text - self.style = style - } - - var body: some View { - ActionButton( - action: action(), - text: text, - style: style - ) - } -} diff --git a/ios/PolkadotVault/Components/PaginatedScrollView.swift b/ios/PolkadotVault/Components/PaginatedScrollView.swift deleted file mode 100644 index 8d4ce7e5e3..0000000000 --- a/ios/PolkadotVault/Components/PaginatedScrollView.swift +++ /dev/null @@ -1,116 +0,0 @@ -// -// PaginatedScrollView.swift -// Polkadot Vault -// -// Created by Krzysztof Rodak on 30/01/2023. -// - -import SwiftUI - -struct PaginatedScrollView: View { - private let items: [AnyView] - private let itemPadding: CGFloat - private let itemSpacing: CGFloat - private let itemWidth: CGFloat - private let itemsAmount: Int - private let contentWidth: CGFloat - - private let leadingOffset: CGFloat - private let scrollDampingFactor: CGFloat = 0.6 - - @Binding var currentPageIndex: Int - - @State private var currentScrollOffset: CGFloat = 0 - @State private var gestureDragOffset: CGFloat = 0 - - init( - currentPageIndex: Binding, - itemsAmount: Int, - itemWidth: CGFloat, - itemPadding: CGFloat, - pageWidth: CGFloat, - @ViewBuilder content: () -> some View - ) { - let views = content() - items = [AnyView(views)] - - _currentPageIndex = currentPageIndex - - self.itemsAmount = itemsAmount - itemSpacing = itemPadding - self.itemWidth = itemWidth - self.itemPadding = itemPadding - contentWidth = (itemWidth + itemPadding) * CGFloat(itemsAmount) - - let itemRemain = (pageWidth - itemWidth - 2 * itemPadding) / 2 - leadingOffset = itemRemain + itemPadding - } - - private func countOffset(for pageIndex: Int) -> CGFloat { - let activePageOffset = CGFloat(pageIndex) * (itemWidth + itemPadding) - return leadingOffset - activePageOffset - } - - private func countPageIndex(for offset: CGFloat) -> Int { - guard itemsAmount > 0 else { return 0 } - var index = Int(round(countLogicalOffset(offset) / (itemWidth + itemPadding))) - // allow to change just 1 page offset at the time - index = min(max(index, currentPageIndex - 1), currentPageIndex + 1) - // keep in items range - index = min(max(index, 0), itemsAmount - 1) - return index - } - - private func countCurrentScrollOffset() -> CGFloat { - countOffset(for: currentPageIndex) + gestureDragOffset - } - - private func countLogicalOffset(_ trueOffset: CGFloat) -> CGFloat { - (trueOffset - leadingOffset) * -1.0 - } - - var body: some View { - GeometryReader { _ in - HStack(alignment: .center, spacing: itemSpacing) { - ForEach(items.indices, id: \.self) { itemIndex in - items[itemIndex].frame(width: itemWidth) - } - } - } - .onAppear { - currentScrollOffset = countOffset(for: currentPageIndex) - } - .background( - Color.black - .opacity(0.000001) - ) // hack - this allows gesture recognizing even when background is transparent - .frame(width: contentWidth) - .offset(x: currentScrollOffset, y: 0) - .simultaneousGesture( - DragGesture(minimumDistance: 1, coordinateSpace: .local) - .onChanged { value in - gestureDragOffset = value.translation.width - currentScrollOffset = countCurrentScrollOffset() - } - .onEnded { value in - let cleanOffset = (value.predictedEndTranslation.width - gestureDragOffset) - let velocityDiff = cleanOffset * scrollDampingFactor - - let newPageIndex = countPageIndex(for: currentScrollOffset + velocityDiff) - - gestureDragOffset = 0 - withAnimation( - .interpolatingSpring( - mass: 0.1, - stiffness: 20, - damping: 1.5, - initialVelocity: 0 - ) - ) { - currentPageIndex = newPageIndex - currentScrollOffset = countCurrentScrollOffset() - } - } - ) - } -} diff --git a/ios/PolkadotVault/Design/SFSymbols.swift b/ios/PolkadotVault/Design/SFSymbols.swift index 1a97099bf2..875f7cd843 100644 --- a/ios/PolkadotVault/Design/SFSymbols.swift +++ b/ios/PolkadotVault/Design/SFSymbols.swift @@ -12,55 +12,10 @@ import SwiftUI /// Refer to https://developer.apple.com/sf-symbols/ for currently available combinations enum SFSymbols: String { case lock - case minus - case plus - case rectangle - case signature - case square - case shield - case trash - case viewfinder - case wifi - case xmark -} - -/// Possibly available system variants for `SFSymbol`. -/// -/// Refer to https://developer.apple.com/sf-symbols/ for currently available combinations -enum SFSymbolVariant: String { - case circle - case down - case exclamationmark - case fill - case forward - case left - case grid - case medium - case magnifyingglass - case oneByTwo = "1x2" - case portrait - case rectangle - case shield - case square - case slash - case text - case triangle - case trianglebadge - case viewfinder } extension Image { init(_ symbol: SFSymbols) { self.init(systemName: symbol.rawValue) } - - init(_ symbol: SFSymbols, variant: SFSymbolVariant?) { - self.init(symbol, variants: [variant]) - } - - init(_ symbol: SFSymbols, variants: [SFSymbolVariant?]) { - let name: String = [[symbol.rawValue], variants.compactMap(\.?.rawValue)] - .flatMap { $0 }.joined(separator: ".") - self.init(systemName: name) - } } diff --git a/ios/PolkadotVault/Modals/Alerts/HorizontalActionsBottomModal.swift b/ios/PolkadotVault/Modals/Alerts/HorizontalActionsBottomModal.swift index 2b989af2ef..dc7232f866 100644 --- a/ios/PolkadotVault/Modals/Alerts/HorizontalActionsBottomModal.swift +++ b/ios/PolkadotVault/Modals/Alerts/HorizontalActionsBottomModal.swift @@ -103,11 +103,12 @@ struct HorizontalActionsBottomModal: View { .foregroundColor(.textAndIconsSecondary) } HStack { - SecondaryButton( - action: animateDismissal(dismissAction()), - text: viewModel.dismissActionLabel + ActionButton( + action: { animateDismissal(dismissAction()) }, + text: viewModel.dismissActionLabel, + style: .secondary() ) - PrimaryButton( + ActionButton( action: { animateDismissal(mainAction()) }, text: viewModel.mainActionLabel, style: viewModel.mainActionStyle diff --git a/ios/PolkadotVault/Modals/Alerts/VerticalActionsBottomModal.swift b/ios/PolkadotVault/Modals/Alerts/VerticalActionsBottomModal.swift index bc56d1f0bd..4df2e8d540 100644 --- a/ios/PolkadotVault/Modals/Alerts/VerticalActionsBottomModal.swift +++ b/ios/PolkadotVault/Modals/Alerts/VerticalActionsBottomModal.swift @@ -69,14 +69,15 @@ struct VerticalActionsBottomModal: View { .foregroundColor(.textAndIconsSecondary) } VStack { - PrimaryButton( + ActionButton( action: { animateDismissal(mainAction()) }, text: viewModel.mainActionLabel, style: viewModel.mainActionStyle ) - SecondaryButton( - action: animateDismissal(dismissAction()), - text: viewModel.dismissActionLabel + ActionButton( + action: { animateDismissal(dismissAction()) }, + text: viewModel.dismissActionLabel, + style: .secondary() ) } .padding(.top, Spacing.extraSmall) diff --git a/ios/PolkadotVault/Modals/Errors/ErrorBottomModal.swift b/ios/PolkadotVault/Modals/Errors/ErrorBottomModal.swift index ea77240e76..4fb60fd036 100644 --- a/ios/PolkadotVault/Modals/Errors/ErrorBottomModal.swift +++ b/ios/PolkadotVault/Modals/Errors/ErrorBottomModal.swift @@ -7,9 +7,13 @@ import SwiftUI -struct ActionModel { +struct ActionModel: Equatable { let label: LocalizedStringKey let action: () -> Void + + static func ==(lhs: ActionModel, rhs: ActionModel) -> Bool { + lhs.label == rhs.label + } } struct ErrorBottomModal: View { @@ -84,21 +88,24 @@ struct ErrorBottomModal: View { } VStack { if let primaryAction = viewModel.primaryAction { - PrimaryButton( + ActionButton( action: { animateDismissal(primaryAction.action()) }, - text: primaryAction.label + text: primaryAction.label, + style: .primary() ) } if let secondaryAction = viewModel.secondaryAction { - SecondaryButton( - action: animateDismissal(secondaryAction.action()), - text: secondaryAction.label + ActionButton( + action: { animateDismissal(secondaryAction.action()) }, + text: secondaryAction.label, + style: .secondary() ) } if let tertiaryAction = viewModel.tertiaryAction { - EmptyButton( - action: animateDismissal(tertiaryAction.action()), - text: tertiaryAction.label + ActionButton( + action: { animateDismissal(tertiaryAction.action()) }, + text: tertiaryAction.label, + style: .emptyPrimary() ) } } diff --git a/ios/PolkadotVault/Modals/Errors/ErrorBottomModalViewModel.swift b/ios/PolkadotVault/Modals/Errors/ErrorBottomModalViewModel.swift index bb25ef7d9b..a4a82d82e7 100644 --- a/ios/PolkadotVault/Modals/Errors/ErrorBottomModalViewModel.swift +++ b/ios/PolkadotVault/Modals/Errors/ErrorBottomModalViewModel.swift @@ -7,8 +7,8 @@ import SwiftUI -struct ErrorBottomModalViewModel { - struct Step { +struct ErrorBottomModalViewModel: Equatable { + struct Step: Equatable { let step: String let content: AttributedString } diff --git a/ios/PolkadotVault/Modals/ExportPrivateKey/ExportPrivateKeyWarningModal.swift b/ios/PolkadotVault/Modals/ExportPrivateKey/ExportPrivateKeyWarningModal.swift index d2388a2daf..ea554f51b7 100644 --- a/ios/PolkadotVault/Modals/ExportPrivateKey/ExportPrivateKeyWarningModal.swift +++ b/ios/PolkadotVault/Modals/ExportPrivateKey/ExportPrivateKeyWarningModal.swift @@ -33,16 +33,18 @@ struct ExportPrivateKeyWarningModal: View { .font(PrimaryFont.bodyL.font) .multilineTextAlignment(.center) .padding(.bottom, Spacing.small) - PrimaryButton( + ActionButton( action: { shouldPresentExportKeysModal.toggle() animateDismissal() }, - text: Localizable.KeyExportWarning.Action.export.key + text: Localizable.KeyExportWarning.Action.export.key, + style: .primary() ) - EmptyButton( - action: animateDismissal(), - text: Localizable.KeyExportWarning.Action.cancel.key + ActionButton( + action: animateDismissal, + text: Localizable.KeyExportWarning.Action.cancel.key, + style: .emptyPrimary() ) } .padding(.horizontal, Spacing.large) diff --git a/ios/PolkadotVault/Modals/KeySet/KeyDetailsActionsModal.swift b/ios/PolkadotVault/Modals/KeySet/KeyDetailsActionsModal.swift index 37ddb00dbc..a5046d76d7 100644 --- a/ios/PolkadotVault/Modals/KeySet/KeyDetailsActionsModal.swift +++ b/ios/PolkadotVault/Modals/KeySet/KeyDetailsActionsModal.swift @@ -39,8 +39,8 @@ struct KeyDetailsActionsModal: View { text: Localizable.KeySetsModal.Action.delete.key, style: .destructive ) - EmptyButton( - action: animateDismissal(), + ActionButton( + action: { animateDismissal() }, text: Localizable.AddKeySet.Button.cancel.key, style: .emptySecondary() ) diff --git a/ios/PolkadotVault/Modals/KeySet/PublicKeyActionsModal.swift b/ios/PolkadotVault/Modals/KeySet/PublicKeyActionsModal.swift index 302a24a529..4d116a0eab 100644 --- a/ios/PolkadotVault/Modals/KeySet/PublicKeyActionsModal.swift +++ b/ios/PolkadotVault/Modals/KeySet/PublicKeyActionsModal.swift @@ -49,8 +49,8 @@ struct PublicKeyActionsModal: View { text: Localizable.PublicKeyDetailsModal.Action.delete.key, style: .destructive ) - EmptyButton( - action: animateDismissal(), + ActionButton( + action: { animateDismissal() }, text: Localizable.AddKeySet.Button.cancel.key, style: .emptySecondary() ) diff --git a/ios/PolkadotVault/Modals/NetworkSelection/NetworkSelectionModal.swift b/ios/PolkadotVault/Modals/NetworkSelection/NetworkSelectionModal.swift index d61d9b302c..09b510109c 100644 --- a/ios/PolkadotVault/Modals/NetworkSelection/NetworkSelectionModal.swift +++ b/ios/PolkadotVault/Modals/NetworkSelection/NetworkSelectionModal.swift @@ -40,11 +40,12 @@ struct NetworkSelectionModal: View { // Bottom actions HStack(spacing: Spacing.extraSmall) { - SecondaryButton( - action: viewModel.resetAction(), - text: Localizable.NetworkFilter.Action.reset.key + ActionButton( + action: viewModel.resetAction, + text: Localizable.NetworkFilter.Action.reset.key, + style: .secondary() ) - PrimaryButton( + ActionButton( action: viewModel.doneAction, text: Localizable.NetworkFilter.Action.done.key, style: .primary() diff --git a/ios/PolkadotVault/Screens/CreateKey/CreateKeysForNetworks/CreateKeysForNetworksView.swift b/ios/PolkadotVault/Screens/CreateKey/CreateKeysForNetworks/CreateKeysForNetworksView.swift index b5a0482a85..a149ca18cd 100644 --- a/ios/PolkadotVault/Screens/CreateKey/CreateKeysForNetworks/CreateKeysForNetworksView.swift +++ b/ios/PolkadotVault/Screens/CreateKey/CreateKeysForNetworks/CreateKeysForNetworksView.swift @@ -30,7 +30,7 @@ struct CreateKeysForNetworksView: View { networkSelection() footer() Spacer() - PrimaryButton( + ActionButton( action: viewModel.onDoneTap, text: Localizable.CreateKeysForNetwork.Action.create.key, style: .primary() diff --git a/ios/PolkadotVault/Screens/CreateKey/NewKeySet/CreateKeySetSeedPhraseView.swift b/ios/PolkadotVault/Screens/CreateKey/NewKeySet/CreateKeySetSeedPhraseView.swift index d78028c81a..54fb624557 100644 --- a/ios/PolkadotVault/Screens/CreateKey/NewKeySet/CreateKeySetSeedPhraseView.swift +++ b/ios/PolkadotVault/Screens/CreateKey/NewKeySet/CreateKeySetSeedPhraseView.swift @@ -62,7 +62,7 @@ struct CreateKeySetSeedPhraseView: View { .padding(.horizontal, Spacing.large) .padding(.bottom, Spacing.extraSmall) Spacer() - PrimaryButton( + ActionButton( action: viewModel.onCreateTap, text: Localizable.NewSeed.Backup.Action.create.key, style: .primary(isDisabled: .constant(!viewModel.confirmBackup)) diff --git a/ios/PolkadotVault/Screens/DerivedKey/CreateKeyNetworkSelectionView.swift b/ios/PolkadotVault/Screens/DerivedKey/CreateKeyNetworkSelectionView.swift index 925aa50e94..98b1700988 100644 --- a/ios/PolkadotVault/Screens/DerivedKey/CreateKeyNetworkSelectionView.swift +++ b/ios/PolkadotVault/Screens/DerivedKey/CreateKeyNetworkSelectionView.swift @@ -43,14 +43,15 @@ struct CreateKeyNetworkSelectionView: View { } Spacer() VStack(alignment: .center, spacing: Spacing.small) { - PrimaryButton( + ActionButton( action: viewModel.didTapCreate, text: Localizable.CreateDerivedKey.Action.create.key, style: .primary() ) - EmptyButton( - action: viewModel.didTapAddCustom(), - text: Localizable.CreateDerivedKey.Action.addCustom.key + ActionButton( + action: viewModel.didTapAddCustom, + text: Localizable.CreateDerivedKey.Action.addCustom.key, + style: .emptyPrimary() ) } .padding(.horizontal, Spacing.large) diff --git a/ios/PolkadotVault/Screens/DerivedKey/Subviews/AddKeySetUpNetworksStepOneView.swift b/ios/PolkadotVault/Screens/DerivedKey/Subviews/AddKeySetUpNetworksStepOneView.swift index a91e8d0b0a..5b17bb4136 100644 --- a/ios/PolkadotVault/Screens/DerivedKey/Subviews/AddKeySetUpNetworksStepOneView.swift +++ b/ios/PolkadotVault/Screens/DerivedKey/Subviews/AddKeySetUpNetworksStepOneView.swift @@ -140,8 +140,8 @@ struct AddKeySetUpNetworksStepOneView: View { .font(PrimaryFont.bodyL.font) Spacer() } - SecondaryButton( - action: viewModel.onScanTap(), + ActionButton( + action: viewModel.onScanTap, text: Localizable.Onboarding.SetUpNetworks.Step1.Label.Step3.action.key, style: .secondary() ) diff --git a/ios/PolkadotVault/Screens/DerivedKey/Subviews/AddKeySetUpNetworksStepTwoView.swift b/ios/PolkadotVault/Screens/DerivedKey/Subviews/AddKeySetUpNetworksStepTwoView.swift index c40e06fd34..29b5143c7a 100644 --- a/ios/PolkadotVault/Screens/DerivedKey/Subviews/AddKeySetUpNetworksStepTwoView.swift +++ b/ios/PolkadotVault/Screens/DerivedKey/Subviews/AddKeySetUpNetworksStepTwoView.swift @@ -128,8 +128,8 @@ struct AddKeySetUpNetworksStepTwoView: View { Localizable.Onboarding.SetUpNetworks.Step2.Label.step3.text .font(PrimaryFont.bodyL.font) } - SecondaryButton( - action: viewModel.onScanTap(), + ActionButton( + action: viewModel.onScanTap, text: Localizable.Onboarding.SetUpNetworks.Step2.Label.Step3.action.key, style: .secondary() ) diff --git a/ios/PolkadotVault/Screens/DerivedKey/Subviews/CreateDerivedKeyConfirmationView.swift b/ios/PolkadotVault/Screens/DerivedKey/Subviews/CreateDerivedKeyConfirmationView.swift index 5a2e1c2b94..3fb6d4f74f 100644 --- a/ios/PolkadotVault/Screens/DerivedKey/Subviews/CreateDerivedKeyConfirmationView.swift +++ b/ios/PolkadotVault/Screens/DerivedKey/Subviews/CreateDerivedKeyConfirmationView.swift @@ -61,7 +61,7 @@ struct CreateDerivedKeyConfirmationView: View { viewModel.toggleCheckbox() } .padding(.bottom, Spacing.large) - PrimaryButton( + ActionButton( action: viewModel.onDoneTap, text: Localizable.CreateDerivedKey.Modal.Confirmation.action.key, style: .primary(isDisabled: $viewModel.isActionDisabled) diff --git a/ios/PolkadotVault/Screens/DerivedKey/Subviews/DerivationMethodsInfoView.swift b/ios/PolkadotVault/Screens/DerivedKey/Subviews/DerivationMethodsInfoView.swift index a83ac96198..ca4ac409ee 100644 --- a/ios/PolkadotVault/Screens/DerivedKey/Subviews/DerivationMethodsInfoView.swift +++ b/ios/PolkadotVault/Screens/DerivedKey/Subviews/DerivationMethodsInfoView.swift @@ -48,9 +48,10 @@ struct DerivationMethodsInfoView: View { Localizable.CreateDerivedKey.InfoModal.DerivationMethods.Password.content.text .foregroundColor(.textAndIconsSecondary) .font(PrimaryFont.bodyM.font) - SecondaryButton( - action: viewModel.animateDismissal(), - text: Localizable.CreateDerivedKey.InfoModal.DerivationMethods.action.key + ActionButton( + action: viewModel.animateDismissal, + text: Localizable.CreateDerivedKey.InfoModal.DerivationMethods.action.key, + style: .secondary() ) } .padding(.horizontal, Spacing.large) diff --git a/ios/PolkadotVault/Screens/Errors/ApplicationUpdateRequiredView.swift b/ios/PolkadotVault/Screens/Errors/ApplicationUpdateRequiredView.swift index 4d1c311273..765ec69f27 100644 --- a/ios/PolkadotVault/Screens/Errors/ApplicationUpdateRequiredView.swift +++ b/ios/PolkadotVault/Screens/Errors/ApplicationUpdateRequiredView.swift @@ -42,7 +42,7 @@ struct ApplicationUpdateRequiredView: View { .strokeContainerBackground() .padding(.horizontal, Spacing.large) .padding(.bottom, Spacing.extraLarge) - PrimaryButton( + ActionButton( action: viewModel.onBackupTap, text: Localizable.Error.ApplicationUpdateRequired.Action.backup.key, style: .primary() diff --git a/ios/PolkadotVault/Screens/Errors/DevicePincodeRequiredView.swift b/ios/PolkadotVault/Screens/Errors/DevicePincodeRequiredView.swift index b2f64e5dff..785c1719a6 100644 --- a/ios/PolkadotVault/Screens/Errors/DevicePincodeRequiredView.swift +++ b/ios/PolkadotVault/Screens/Errors/DevicePincodeRequiredView.swift @@ -50,7 +50,7 @@ struct DevicePincodeRequired: View { .strokeContainerBackground() .padding(.horizontal, Spacing.large) .padding(.bottom, Spacing.extraExtraLarge) - PrimaryButton( + ActionButton( action: viewModel.onOpenTap, text: Localizable.Error.DevicePincodeRequired.Action.settings.key, style: .primary() diff --git a/ios/PolkadotVault/Screens/Errors/UnlockDeviceView.swift b/ios/PolkadotVault/Screens/Errors/UnlockDeviceView.swift index 011dc6f602..817063775a 100644 --- a/ios/PolkadotVault/Screens/Errors/UnlockDeviceView.swift +++ b/ios/PolkadotVault/Screens/Errors/UnlockDeviceView.swift @@ -25,7 +25,7 @@ struct UnlockDeviceView: View { .foregroundColor(.textAndIconsTertiary) .padding(.horizontal, Spacing.extraExtraLarge) .padding(.bottom, Spacing.extraExtraLarge) - PrimaryButton( + ActionButton( action: viewModel.onUnlockTap, text: Localizable.Error.LockedDevice.Action.unlock.key, style: .primary() diff --git a/ios/PolkadotVault/Screens/KeyDetails/Views/KeyDetailsView+EmptyState.swift b/ios/PolkadotVault/Screens/KeyDetails/Views/KeyDetailsView+EmptyState.swift index 2df606d7b3..d12b2bb699 100644 --- a/ios/PolkadotVault/Screens/KeyDetails/Views/KeyDetailsView+EmptyState.swift +++ b/ios/PolkadotVault/Screens/KeyDetails/Views/KeyDetailsView+EmptyState.swift @@ -16,7 +16,7 @@ extension KeyDetailsView { .foregroundColor(.textAndIconsPrimary) .padding(.top, Spacing.large) .padding(.horizontal, Spacing.componentSpacer) - PrimaryButton( + ActionButton( action: viewModel.onCreateDerivedKeyTap, text: Localizable.KeyDetails.Label.EmptyState.action.key, style: .secondary() diff --git a/ios/PolkadotVault/Screens/KeyDetails/Views/RootKeyDetailsModal.swift b/ios/PolkadotVault/Screens/KeyDetails/Views/RootKeyDetailsModal.swift index d937aab611..5aa03c5662 100644 --- a/ios/PolkadotVault/Screens/KeyDetails/Views/RootKeyDetailsModal.swift +++ b/ios/PolkadotVault/Screens/KeyDetails/Views/RootKeyDetailsModal.swift @@ -69,10 +69,10 @@ struct RootKeyDetailsModal: View { } .padding(.horizontal, Spacing.medium) .padding(.top, Spacing.medium) - // Close - SecondaryButton( - action: animateDismissal(), - text: Localizable.KeyDetails.Root.Action.close.key + ActionButton( + action: animateDismissal, + text: Localizable.KeyDetails.Root.Action.close.key, + style: .secondary() ) .padding(Spacing.large) } diff --git a/ios/PolkadotVault/Screens/Logs/Views/LogsMoreActionsModal.swift b/ios/PolkadotVault/Screens/Logs/Views/LogsMoreActionsModal.swift index 04d9a747c4..c727f65bb7 100644 --- a/ios/PolkadotVault/Screens/Logs/Views/LogsMoreActionsModal.swift +++ b/ios/PolkadotVault/Screens/Logs/Views/LogsMoreActionsModal.swift @@ -32,8 +32,8 @@ struct LogsMoreActionsModal: View { text: Localizable.LogsList.More.Action.clear.key, style: .destructive ) - EmptyButton( - action: animateDismissal(), + ActionButton( + action: { animateDismissal() }, text: Localizable.LogsList.More.Action.cancel.key, style: .emptySecondary() ) diff --git a/ios/PolkadotVault/Screens/NoKeySets/NoKeySetsView.swift b/ios/PolkadotVault/Screens/NoKeySets/NoKeySetsView.swift index ca4933f095..5146c8d377 100644 --- a/ios/PolkadotVault/Screens/NoKeySets/NoKeySetsView.swift +++ b/ios/PolkadotVault/Screens/NoKeySets/NoKeySetsView.swift @@ -27,12 +27,12 @@ struct NoKeySetsView: View { .padding(.horizontal, Spacing.extraLarge) .padding(.bottom, Spacing.flexibleComponentSpacer) VStack(alignment: .leading, spacing: Spacing.extraSmall) { - PrimaryButton( + ActionButton( action: viewModel.onAddTap, text: Localizable.NoKeySets.Action.add.key, style: .primary() ) - PrimaryButton( + ActionButton( action: viewModel.onRecoverTap, text: Localizable.NoKeySets.Action.recover.key, style: .secondary() diff --git a/ios/PolkadotVault/Screens/Onboarding/Airgap/NoAirgapView.swift b/ios/PolkadotVault/Screens/Onboarding/Airgap/NoAirgapView.swift index fb5a9dd058..b0205fdc65 100644 --- a/ios/PolkadotVault/Screens/Onboarding/Airgap/NoAirgapView.swift +++ b/ios/PolkadotVault/Screens/Onboarding/Airgap/NoAirgapView.swift @@ -83,7 +83,7 @@ struct NoAirgapView: View { .padding(.horizontal, Spacing.medium) .padding(.vertical, Spacing.extraSmall) Spacer() - PrimaryButton( + ActionButton( action: viewModel.onDoneTap, text: viewModel.actionTitle, style: .primary(isDisabled: $viewModel.isActionDisabled) diff --git a/ios/PolkadotVault/Screens/Onboarding/OnboardingAgreementsView.swift b/ios/PolkadotVault/Screens/Onboarding/OnboardingAgreementsView.swift index 81f8559d15..ce695c0ac1 100644 --- a/ios/PolkadotVault/Screens/Onboarding/OnboardingAgreementsView.swift +++ b/ios/PolkadotVault/Screens/Onboarding/OnboardingAgreementsView.swift @@ -71,7 +71,7 @@ struct OnboardingAgreementsView: View { } .padding(.horizontal, Spacing.large) .padding(.bottom, Spacing.extraLarge) - PrimaryButton( + ActionButton( action: viewModel.onDoneTap, text: Localizable.Onboarding.Agreements.Action.accept.key, style: .primary(isDisabled: $viewModel.isActionDisabled) diff --git a/ios/PolkadotVault/Screens/Onboarding/OnboardingScreenshotsView.swift b/ios/PolkadotVault/Screens/Onboarding/OnboardingScreenshotsView.swift index c914f0688d..c31bf079d9 100644 --- a/ios/PolkadotVault/Screens/Onboarding/OnboardingScreenshotsView.swift +++ b/ios/PolkadotVault/Screens/Onboarding/OnboardingScreenshotsView.swift @@ -64,7 +64,7 @@ struct OnboardingScreenshotsView: View { } .padding(.horizontal, Spacing.extraLarge) .padding(.bottom, Spacing.extraSmall) - PrimaryButton( + ActionButton( action: viewModel.onDoneTap, text: Localizable.Onboarding.Screenshots.Action.next.key, style: .primary(isDisabled: $viewModel.isActionDisabled) diff --git a/ios/PolkadotVault/Screens/Onboarding/SetUpNetworks/SetUpNetworksIntroView.swift b/ios/PolkadotVault/Screens/Onboarding/SetUpNetworks/SetUpNetworksIntroView.swift index 89653d6e62..0475e7e850 100644 --- a/ios/PolkadotVault/Screens/Onboarding/SetUpNetworks/SetUpNetworksIntroView.swift +++ b/ios/PolkadotVault/Screens/Onboarding/SetUpNetworks/SetUpNetworksIntroView.swift @@ -29,15 +29,15 @@ struct SetUpNetworksIntroView: View { // Networks preview Image(.networkPreviewIcons) Spacer() - PrimaryButton( + ActionButton( action: viewModel.onSetUpTap, text: Localizable.Onboarding.SetUpNetworks.Action.setUp.key, style: .primary() ) .padding(.horizontal, Spacing.large) .padding(.bottom, Spacing.extraSmall) - SecondaryButton( - action: viewModel.onLaterTap(), + ActionButton( + action: viewModel.onLaterTap, text: Localizable.Onboarding.SetUpNetworks.Action.later.key, style: .secondary() ) diff --git a/ios/PolkadotVault/Screens/Onboarding/SetUpNetworks/SetUpNetworksStepOneView.swift b/ios/PolkadotVault/Screens/Onboarding/SetUpNetworks/SetUpNetworksStepOneView.swift index b66e0dbbd5..30ef4b6403 100644 --- a/ios/PolkadotVault/Screens/Onboarding/SetUpNetworks/SetUpNetworksStepOneView.swift +++ b/ios/PolkadotVault/Screens/Onboarding/SetUpNetworks/SetUpNetworksStepOneView.swift @@ -117,8 +117,8 @@ struct SetUpNetworksStepOneView: View { .font(PrimaryFont.bodyL.font) Spacer() } - SecondaryButton( - action: viewModel.onScanTap(), + ActionButton( + action: viewModel.onScanTap, text: Localizable.Onboarding.SetUpNetworks.Step1.Label.Step3.action.key, style: .secondary() ) diff --git a/ios/PolkadotVault/Screens/Onboarding/SetUpNetworks/SetUpNetworksStepTwoView.swift b/ios/PolkadotVault/Screens/Onboarding/SetUpNetworks/SetUpNetworksStepTwoView.swift index 4255c32d51..732528c2e9 100644 --- a/ios/PolkadotVault/Screens/Onboarding/SetUpNetworks/SetUpNetworksStepTwoView.swift +++ b/ios/PolkadotVault/Screens/Onboarding/SetUpNetworks/SetUpNetworksStepTwoView.swift @@ -116,8 +116,8 @@ struct SetUpNetworksStepTwoView: View { Localizable.Onboarding.SetUpNetworks.Step2.Label.step3.text .font(PrimaryFont.bodyL.font) } - SecondaryButton( - action: viewModel.onScanTap(), + ActionButton( + action: viewModel.onScanTap, text: Localizable.Onboarding.SetUpNetworks.Step2.Label.Step3.action.key, style: .secondary() ) diff --git a/ios/PolkadotVault/Screens/Scan/AddKeysForNetwork/AddKeysForNetworkModal.swift b/ios/PolkadotVault/Screens/Scan/AddKeysForNetwork/AddKeysForNetworkModal.swift index c64b3d0ee2..7addbb5b50 100644 --- a/ios/PolkadotVault/Screens/Scan/AddKeysForNetwork/AddKeysForNetworkModal.swift +++ b/ios/PolkadotVault/Screens/Scan/AddKeysForNetwork/AddKeysForNetworkModal.swift @@ -26,14 +26,15 @@ struct AddKeysForNetworkModal: View { .fixedSize(horizontal: false, vertical: true) .multilineTextAlignment(.center) VStack(alignment: .center, spacing: Spacing.extraSmall) { - PrimaryButton( + ActionButton( action: { animateDismissal(viewModel.onCreateTap) }, text: Localizable.AddKeysForNetworkModal.Action.accept.key, style: .primary() ) - EmptyButton( - action: animateDismissal(viewModel.onCancelTap), - text: Localizable.AddKeysForNetworkModal.Action.cancel.key + ActionButton( + action: { animateDismissal(viewModel.onCancelTap) }, + text: Localizable.AddKeysForNetworkModal.Action.cancel.key, + style: .emptyPrimary() ) } } diff --git a/ios/PolkadotVault/Screens/Scan/AddKeysForNetwork/SelectKeySetsForNetworkKeyView.swift b/ios/PolkadotVault/Screens/Scan/AddKeysForNetwork/SelectKeySetsForNetworkKeyView.swift index 6524a37ef0..8c631685b6 100644 --- a/ios/PolkadotVault/Screens/Scan/AddKeysForNetwork/SelectKeySetsForNetworkKeyView.swift +++ b/ios/PolkadotVault/Screens/Scan/AddKeysForNetwork/SelectKeySetsForNetworkKeyView.swift @@ -30,11 +30,12 @@ struct SelectKeySetsForNetworkKeyView: View { } } HStack(spacing: Spacing.extraSmall) { - SecondaryButton( - action: viewModel.onCancelTap(), - text: Localizable.SelectKeySetsForNetworkKey.Action.cancel.key + ActionButton( + action: viewModel.onCancelTap, + text: Localizable.SelectKeySetsForNetworkKey.Action.cancel.key, + style: .secondary() ) - PrimaryButton( + ActionButton( action: viewModel.onDoneTap, text: Localizable.SelectKeySetsForNetworkKey.Action.create.key, style: .primary(isDisabled: .constant(viewModel.selectedSeedNames.isEmpty)) diff --git a/ios/PolkadotVault/Screens/Scan/DynamicDerivations/AddDerivedKeysView.swift b/ios/PolkadotVault/Screens/Scan/DynamicDerivations/AddDerivedKeysView.swift index 24e3b596ca..cdf2852faf 100644 --- a/ios/PolkadotVault/Screens/Scan/DynamicDerivations/AddDerivedKeysView.swift +++ b/ios/PolkadotVault/Screens/Scan/DynamicDerivations/AddDerivedKeysView.swift @@ -29,8 +29,8 @@ struct AddDerivedKeysView: View { keySets() qrCodeFooter() Spacer() - SecondaryButton( - action: viewModel.onDoneTap(), + ActionButton( + action: viewModel.onDoneTap, text: Localizable.AddDerivedKeys.Action.done.key, style: .secondary() ) diff --git a/ios/PolkadotVault/Screens/Scan/TransactionPreview.swift b/ios/PolkadotVault/Screens/Scan/TransactionPreview.swift index 5143405e53..b23d029805 100644 --- a/ios/PolkadotVault/Screens/Scan/TransactionPreview.swift +++ b/ios/PolkadotVault/Screens/Scan/TransactionPreview.swift @@ -145,19 +145,19 @@ struct TransactionPreview: View { switch transactionType { case .sign, .read: - PrimaryButton( + ActionButton( action: viewModel.onDoneTap, text: Localizable.TransactionPreview.Action.done.key, style: .secondary() ) case .stub: - PrimaryButton( + ActionButton( action: viewModel.onApproveTap, text: Localizable.TransactionPreview.Action.approve.key, style: .primary() ) case .importDerivations: - PrimaryButton( + ActionButton( action: viewModel.onImportKeysTap, text: Localizable.ImportKeys.Action.import.key, style: .primary() @@ -167,9 +167,10 @@ struct TransactionPreview: View { EmptyView() } if ![.done, .sign, .read].contains(transactionType) { - EmptyButton( - action: viewModel.onCancelTap(), - text: Localizable.TransactionPreview.Action.cancel.key + ActionButton( + action: viewModel.onCancelTap, + text: Localizable.TransactionPreview.Action.cancel.key, + style: .emptyPrimary() ) } } diff --git a/ios/PolkadotVault/Screens/Settings/Subviews/Networks/NetworkSettingsDetailsActionModal.swift b/ios/PolkadotVault/Screens/Settings/Subviews/Networks/NetworkSettingsDetailsActionModal.swift index c3c76e1967..48a4c29827 100644 --- a/ios/PolkadotVault/Screens/Settings/Subviews/Networks/NetworkSettingsDetailsActionModal.swift +++ b/ios/PolkadotVault/Screens/Settings/Subviews/Networks/NetworkSettingsDetailsActionModal.swift @@ -32,8 +32,8 @@ struct NetworkSettingsDetailsActionModal: View { text: Localizable.Settings.NetworkDetails.More.Action.delete.key, style: .destructive ) - EmptyButton( - action: animateDismissal(), + ActionButton( + action: { animateDismissal() }, text: Localizable.LogsList.More.Action.cancel.key, style: .emptySecondary() ) diff --git a/ios/PolkadotVault/Screens/Settings/Subviews/SignSpecs/SignSpecDetailsView.swift b/ios/PolkadotVault/Screens/Settings/Subviews/SignSpecs/SignSpecDetailsView.swift index 193c8b6b4e..b948d6a68f 100644 --- a/ios/PolkadotVault/Screens/Settings/Subviews/SignSpecs/SignSpecDetailsView.swift +++ b/ios/PolkadotVault/Screens/Settings/Subviews/SignSpecs/SignSpecDetailsView.swift @@ -44,9 +44,10 @@ struct SignSpecDetails: View { ) ) .padding(.horizontal, Spacing.large) - SecondaryButton( - action: viewModel.onBackTap(), - text: Localizable.SignSpecsDetails.Action.done.key + ActionButton( + action: viewModel.onBackTap, + text: Localizable.SignSpecsDetails.Action.done.key, + style: .secondary() ) .padding(.horizontal, Spacing.large) .padding(.top, Spacing.extraExtraLarge)