diff --git a/packages/theme/src/spacings.ts b/packages/theme/src/spacings.ts index c8c6e9716fc..059b32c0661 100644 --- a/packages/theme/src/spacings.ts +++ b/packages/theme/src/spacings.ts @@ -27,14 +27,20 @@ export type Spacings = typeof spacings; export type Spacing = keyof typeof spacings; export type SpacingValues = Spacings[Spacing]; +type NativeSpacingValue = 2 | 4 | 8 | 12 | 16 | 24 | 32 | 40 | 52 | 64; + export const nativeSpacings = { - extraSmall: 4, - small: 8, - medium: 16, - large: 24, - extraLarge: 32, - xxl: 64, -} as const; + sp2: 2, + sp4: 4, + sp8: 8, + sp12: 12, + sp16: 16, + sp24: 24, + sp32: 32, + sp40: 40, + sp52: 52, + sp64: 64, +} as const satisfies { [V in NativeSpacingValue as `sp${V}`]: V }; export type NativeSpacings = typeof nativeSpacings; export type NativeSpacing = keyof typeof nativeSpacings; diff --git a/suite-native/accounts/src/components/AccountSectionTitle.tsx b/suite-native/accounts/src/components/AccountSectionTitle.tsx index 3ef9a28837a..e6ba9f61251 100644 --- a/suite-native/accounts/src/components/AccountSectionTitle.tsx +++ b/suite-native/accounts/src/components/AccountSectionTitle.tsx @@ -33,7 +33,7 @@ export const AccountSectionTitle: React.FC = ({ }, [account, localCurrency, rates]); return ( - + {account.accountLabel} {hasAnyKnownTokens && ( diff --git a/suite-native/accounts/src/components/AccountSelectBottomSheet.tsx b/suite-native/accounts/src/components/AccountSelectBottomSheet.tsx index c603e46aeb0..6ebeae195cc 100644 --- a/suite-native/accounts/src/components/AccountSelectBottomSheet.tsx +++ b/suite-native/accounts/src/components/AccountSelectBottomSheet.tsx @@ -20,7 +20,7 @@ type AccountSelectBottomSheetProps = { }; const contentContainerStyle = prepareNativeStyle(utils => ({ - paddingHorizontal: utils.spacings.medium, + paddingHorizontal: utils.spacings.sp16, })); export const AccountSelectBottomSheet = React.memo( diff --git a/suite-native/accounts/src/components/AccountsList/AccountsList.tsx b/suite-native/accounts/src/components/AccountsList/AccountsList.tsx index 7f50e214246..0121d04bacc 100644 --- a/suite-native/accounts/src/components/AccountsList/AccountsList.tsx +++ b/suite-native/accounts/src/components/AccountsList/AccountsList.tsx @@ -56,7 +56,7 @@ export const AccountsList = ({ return ( <> - + {groups.map(([accountTypeHeader, networkAccounts]) => ( {networkAccounts.map(account => ( diff --git a/suite-native/accounts/src/components/AccountsList/AccountsListItemBase.tsx b/suite-native/accounts/src/components/AccountsList/AccountsListItemBase.tsx index a694851abd8..af705900055 100644 --- a/suite-native/accounts/src/components/AccountsList/AccountsListItemBase.tsx +++ b/suite-native/accounts/src/components/AccountsList/AccountsListItemBase.tsx @@ -31,14 +31,14 @@ const accountListItemStyle = prepareNativeStyle<{ alignItem: 'center', paddingVertical: 12, - paddingHorizontal: utils.spacings.medium, + paddingHorizontal: utils.spacings.sp16, extend: { condition: hasBackground, style: { backgroundColor: utils.colors.backgroundSurfaceElevation1, - paddingTop: utils.spacings.medium, - paddingBottom: utils.spacings.medium, + paddingTop: utils.spacings.sp16, + paddingBottom: utils.spacings.sp16, extend: [ { @@ -54,7 +54,7 @@ const accountListItemStyle = prepareNativeStyle<{ style: { borderBottomLeftRadius: utils.borders.radii.medium, borderBottomRightRadius: utils.borders.radii.medium, - marginBottom: utils.spacings.extraLarge, + marginBottom: utils.spacings.sp32, ...utils.boxShadows.small, }, }, @@ -78,7 +78,7 @@ const valuesContainerStyle = prepareNativeStyle(utils => ({ maxWidth: '40%', flexShrink: 0, alignItems: 'flex-end', - paddingLeft: utils.spacings.small, + paddingLeft: utils.spacings.sp8, })); export const AccountsListItemBase = ({ @@ -110,10 +110,10 @@ export const AccountsListItemBase = ({ disabled={disabled} > - {icon} + {icon} {title} - + {badges} diff --git a/suite-native/accounts/src/components/AccountsSearchForm.tsx b/suite-native/accounts/src/components/AccountsSearchForm.tsx index cec79d33de4..93d8f0085b6 100644 --- a/suite-native/accounts/src/components/AccountsSearchForm.tsx +++ b/suite-native/accounts/src/components/AccountsSearchForm.tsx @@ -46,7 +46,7 @@ export const AccountsSearchForm = ({ onPressCancel, onInputChange }: AccountsSea )} exiting={FadeOut.duration(SEARCH_INPUT_ANIMATION_DURATION)} > - + ({ height: SEARCH_FORM_CONTAINER_HEIGHT, - marginBottom: utils.spacings.medium, + marginBottom: utils.spacings.sp16, })); export const SearchableAccountsListScreenHeader = ({ diff --git a/suite-native/accounts/src/components/SelectableNetworkItem.tsx b/suite-native/accounts/src/components/SelectableNetworkItem.tsx index 728af8b9e20..3e313b09cb2 100644 --- a/suite-native/accounts/src/components/SelectableNetworkItem.tsx +++ b/suite-native/accounts/src/components/SelectableNetworkItem.tsx @@ -19,11 +19,11 @@ const selectableAssetContentStyle = prepareNativeStyle(utils => ({ alignItems: 'center', justifyContent: 'space-between', flex: 1, - marginLeft: utils.spacings.small + utils.spacings.extraSmall, + marginLeft: utils.spacings.sp8 + utils.spacings.sp4, })); const tokensBadgeStyle = prepareNativeStyle(utils => ({ - paddingBottom: utils.spacings.extraSmall / 2, + paddingBottom: utils.spacings.sp4 / 2, })); export const SelectableNetworkItem = ({ symbol, onPress, rightIcon }: SelectableAssetItemProps) => { diff --git a/suite-native/alerts/src/components/AlertSheet.tsx b/suite-native/alerts/src/components/AlertSheet.tsx index 6248cc2ea09..493e4ae8646 100644 --- a/suite-native/alerts/src/components/AlertSheet.tsx +++ b/suite-native/alerts/src/components/AlertSheet.tsx @@ -24,18 +24,18 @@ type AlertSheetProps = { const alertSheetContainerStyle = prepareNativeStyle(utils => ({ justifyContent: 'center', alignItems: 'center', - paddingTop: utils.spacings.extraLarge, - paddingHorizontal: utils.spacings.large, - paddingVertical: utils.spacings.extraLarge, - marginBottom: utils.spacings.extraLarge, - marginHorizontal: utils.spacings.small, + paddingTop: utils.spacings.sp32, + paddingHorizontal: utils.spacings.sp24, + paddingVertical: utils.spacings.sp32, + marginBottom: utils.spacings.sp32, + marginHorizontal: utils.spacings.sp8, borderRadius: utils.borders.radii.medium, ...utils.boxShadows.small, })); const alertSheetContentStyle = prepareNativeStyle(utils => ({ width: '100%', - gap: utils.spacings.large, + gap: utils.spacings.sp24, })); const shakeTriggerStyle = prepareNativeStyle(_ => ({ @@ -115,7 +115,7 @@ export const AlertSheet = ({ alert }: AlertSheetProps) => { /> )} {appendix} - + Valid messages: - + {allValidMessages.map(m => ( diff --git a/suite-native/module-dev-utils/src/components/TestnetsToggle.tsx b/suite-native/module-dev-utils/src/components/TestnetsToggle.tsx index c1d978624cc..e5a3236a7a4 100644 --- a/suite-native/module-dev-utils/src/components/TestnetsToggle.tsx +++ b/suite-native/module-dev-utils/src/components/TestnetsToggle.tsx @@ -13,7 +13,7 @@ export const TestnetsToggle = () => { }; return ( - + Testnet coins & features diff --git a/suite-native/module-dev-utils/src/screens/DemoScreen.tsx b/suite-native/module-dev-utils/src/screens/DemoScreen.tsx index acb98be15b3..3a76688d646 100644 --- a/suite-native/module-dev-utils/src/screens/DemoScreen.tsx +++ b/suite-native/module-dev-utils/src/screens/DemoScreen.tsx @@ -36,7 +36,7 @@ import { TypographyStyle } from '@trezor/theme'; const inputStackStyle = prepareNativeStyle(utils => ({ borderRadius: utils.borders.radii.medium, - padding: utils.spacings.small, + padding: utils.spacings.sp8, })); const textVariants: TypographyStyle[] = [ @@ -99,7 +99,7 @@ export const DemoScreen = () => { return ( }> - + Badge: @@ -233,8 +233,8 @@ export const DemoScreen = () => { {}} placeholder="Type here.." /> - - + + { - - + + { - + Title Large @@ -281,16 +281,16 @@ export const DemoScreen = () => { onChange={() => setIsSwitch2Active(!isSwitch2Active)} isDisabled /> - + Icon: - + Hints: Hned to mažem Please enter a valid address dumbo - + Radio: { /> - + Checkbox: { null} /> - + AlertBox: - + @@ -359,7 +359,7 @@ export const DemoScreen = () => { /> - + Skeleton diff --git a/suite-native/module-dev-utils/src/screens/DevUtilsScreen.tsx b/suite-native/module-dev-utils/src/screens/DevUtilsScreen.tsx index 019d955e035..c051fd63f35 100644 --- a/suite-native/module-dev-utils/src/screens/DevUtilsScreen.tsx +++ b/suite-native/module-dev-utils/src/screens/DevUtilsScreen.tsx @@ -27,7 +27,7 @@ export const DevUtilsScreen = ({ }> - + { customHorizontalPadding={0} > {isEmptyHomeRendererShown ? ( - + ) : ( diff --git a/suite-native/module-home/src/screens/HomeScreen/components/BiometricsBottomSheet.tsx b/suite-native/module-home/src/screens/HomeScreen/components/BiometricsBottomSheet.tsx index d118a12f159..05d1dcbeddc 100644 --- a/suite-native/module-home/src/screens/HomeScreen/components/BiometricsBottomSheet.tsx +++ b/suite-native/module-home/src/screens/HomeScreen/components/BiometricsBottomSheet.tsx @@ -25,17 +25,17 @@ const cardStyle = prepareNativeStyle(utils => ({ textAlign: 'center', borderRadius: utils.borders.radii.medium, backgroundColor: utils.colors.backgroundSurfaceElevation1, - padding: utils.spacings.large, - marginBottom: utils.spacings.large, - gap: utils.spacings.large, + padding: utils.spacings.sp24, + marginBottom: utils.spacings.sp24, + gap: utils.spacings.sp24, })); const textContentStyle = prepareNativeStyle(utils => ({ - gap: utils.spacings.small, + gap: utils.spacings.sp8, })); const buttonWrapperStyle = prepareNativeStyle(utils => ({ - gap: utils.spacings.medium, - paddingHorizontal: utils.spacings.small, + gap: utils.spacings.sp16, + paddingHorizontal: utils.spacings.sp8, })); export const BiometricsBottomSheet = () => { diff --git a/suite-native/module-home/src/screens/HomeScreen/components/EmptyConnectedDeviceState.tsx b/suite-native/module-home/src/screens/HomeScreen/components/EmptyConnectedDeviceState.tsx index d3e9700089e..2bb7c10b9b2 100644 --- a/suite-native/module-home/src/screens/HomeScreen/components/EmptyConnectedDeviceState.tsx +++ b/suite-native/module-home/src/screens/HomeScreen/components/EmptyConnectedDeviceState.tsx @@ -14,8 +14,8 @@ const cardStyle = prepareNativeStyle(utils => ({ flex: 1, justifyContent: 'center', alignItems: 'center', - paddingVertical: utils.spacings.extraLarge, - paddingHorizontal: utils.spacings.large, + paddingVertical: utils.spacings.sp32, + paddingHorizontal: utils.spacings.sp24, })); const contentStyle = prepareNativeStyle(_ => ({ @@ -38,7 +38,7 @@ export const EmptyConnectedDeviceState = () => { return ( - + ((utils, { flex }) => ({ flex, justifyContent: 'center', - paddingTop: utils.spacings.extraLarge, - paddingBottom: utils.spacings.large, - paddingHorizontal: utils.spacings.large, + paddingTop: utils.spacings.sp32, + paddingBottom: utils.spacings.sp24, + paddingHorizontal: utils.spacings.sp24, })); const buttonWrapperStyle = prepareNativeStyle(() => ({ @@ -58,10 +58,10 @@ export const EmptyPortfolioCrossroads = () => { }; return ( - + - - + + @@ -82,8 +82,8 @@ export const EmptyPortfolioCrossroads = () => { - - + + diff --git a/suite-native/module-home/src/screens/HomeScreen/components/EmptyPortfolioTrackerState.tsx b/suite-native/module-home/src/screens/HomeScreen/components/EmptyPortfolioTrackerState.tsx index ab8c1c8fe4b..6577b62ed09 100644 --- a/suite-native/module-home/src/screens/HomeScreen/components/EmptyPortfolioTrackerState.tsx +++ b/suite-native/module-home/src/screens/HomeScreen/components/EmptyPortfolioTrackerState.tsx @@ -17,9 +17,9 @@ import { const SCREEN_HEIGHT = Dimensions.get('screen').height; const cardStyle = prepareNativeStyle(utils => ({ - paddingTop: utils.spacings.extraLarge, - paddingBottom: utils.spacings.large, - paddingVertical: utils.spacings.large, + paddingTop: utils.spacings.sp32, + paddingBottom: utils.spacings.sp24, + paddingVertical: utils.spacings.sp24, })); const imageStyle = prepareNativeStyle(_ => ({ maxHeight: SCREEN_HEIGHT * 0.25, @@ -49,22 +49,22 @@ export const EmptyPortfolioTrackerState = () => { }; return ( - + } style={applyStyle(cardStyle)} > diff --git a/suite-native/module-home/src/screens/HomeScreen/components/EnableViewOnlyBottomSheet.tsx b/suite-native/module-home/src/screens/HomeScreen/components/EnableViewOnlyBottomSheet.tsx index d9542576de3..2be4a96f35d 100644 --- a/suite-native/module-home/src/screens/HomeScreen/components/EnableViewOnlyBottomSheet.tsx +++ b/suite-native/module-home/src/screens/HomeScreen/components/EnableViewOnlyBottomSheet.tsx @@ -28,13 +28,13 @@ import { DisconnectedTrezorSvg } from '../../../assets/DisconnectedTrezorSvg'; const SHOW_TIMEOUT = 1500; const svgStyle = prepareNativeStyle(utils => ({ - paddingTop: utils.spacings.small, + paddingTop: utils.spacings.sp8, width: '100%', height: 206, })); const buttonWrapperStyle = prepareNativeStyle(utils => ({ - gap: utils.spacings.medium, + gap: utils.spacings.sp16, })); export const EnableViewOnlyBottomSheet = () => { @@ -139,7 +139,7 @@ export const EnableViewOnlyBottomSheet = () => { return ( - + diff --git a/suite-native/module-home/src/screens/HomeScreen/components/PortfolioContent.tsx b/suite-native/module-home/src/screens/HomeScreen/components/PortfolioContent.tsx index e160582f89a..cf8ec9162d2 100644 --- a/suite-native/module-home/src/screens/HomeScreen/components/PortfolioContent.tsx +++ b/suite-native/module-home/src/screens/HomeScreen/components/PortfolioContent.tsx @@ -35,9 +35,9 @@ export const PortfolioContent = forwardRef((_props, ref) => { }; return ( - + - + diff --git a/suite-native/module-home/src/screens/HomeScreen/components/PortfolioGraph.tsx b/suite-native/module-home/src/screens/HomeScreen/components/PortfolioGraph.tsx index 7ccc862957e..6d2ceec40bf 100644 --- a/suite-native/module-home/src/screens/HomeScreen/components/PortfolioGraph.tsx +++ b/suite-native/module-home/src/screens/HomeScreen/components/PortfolioGraph.tsx @@ -55,7 +55,7 @@ export const PortfolioGraph = forwardRef((_props, ref) => { ); return ( - + {isAnyMainnetAccountPresent ? : null} { return ( - + {!isLoading && ( ({ width: '100%', - paddingHorizontal: utils.spacings.medium, + paddingHorizontal: utils.spacings.sp16, marginBottom: 28, })); @@ -33,7 +33,7 @@ export const OnboardingFooter = ({ const buttonTitle = route.name === OnboardingStackRoutes.Welcome ? 'Get started' : 'Next'; return ( - + {onBack && ( diff --git a/suite-native/receive/src/components/TokenReceiveCard.tsx b/suite-native/receive/src/components/TokenReceiveCard.tsx index 7ddfff37d23..b162c6ad35d 100644 --- a/suite-native/receive/src/components/TokenReceiveCard.tsx +++ b/suite-native/receive/src/components/TokenReceiveCard.tsx @@ -27,7 +27,7 @@ const valuesContainerStyle = prepareNativeStyle(utils => ({ maxWidth: '40%', flexShrink: 0, alignItems: 'flex-end', - paddingLeft: utils.spacings.small, + paddingLeft: utils.spacings.sp8, })); export const TokenReceiveCard = ({ contract, accountKey }: TokenReceiveCardProps) => { @@ -53,7 +53,7 @@ export const TokenReceiveCard = ({ contract, accountKey }: TokenReceiveCardProps - + diff --git a/suite-native/receive/src/components/UnverifiedAddress.tsx b/suite-native/receive/src/components/UnverifiedAddress.tsx index 65a49986989..2523cd1a775 100644 --- a/suite-native/receive/src/components/UnverifiedAddress.tsx +++ b/suite-native/receive/src/components/UnverifiedAddress.tsx @@ -27,7 +27,7 @@ export const UnverifiedAddress = ({ const isDeviceInViewOnlyMode = useSelector(selectIsDeviceInViewOnlyMode); return ( - + {isPortfolioTrackerDevice || isDeviceInViewOnlyMode ? ( ) : ( diff --git a/suite-native/receive/src/components/UnverifiedAddressDevice.tsx b/suite-native/receive/src/components/UnverifiedAddressDevice.tsx index 693a702095b..75a7aa49af8 100644 --- a/suite-native/receive/src/components/UnverifiedAddressDevice.tsx +++ b/suite-native/receive/src/components/UnverifiedAddressDevice.tsx @@ -32,7 +32,7 @@ const PAN_GESTURE_THRESHOLD = 50; const deviceFrameStyle = prepareNativeStyle(utils => ({ width: DEVICE_SCREEN_WIDTH, - padding: utils.spacings.extraSmall, + padding: utils.spacings.sp4, borderWidth: utils.borders.widths.small, borderRadius: utils.borders.radii.large / 2, borderColor: utils.colors.borderElevation2, @@ -43,7 +43,7 @@ const deviceScreenStyle = prepareNativeStyle<{ isPaginationEnabled: boolean }>( justifyContent: 'center', alignItems: 'center', minHeight: DEVICE_SCREEN_HEIGHT, - paddingVertical: isPaginationEnabled ? utils.spacings.large : 40, + paddingVertical: isPaginationEnabled ? utils.spacings.sp24 : 40, maxWidth: DEVICE_SCREEN_WIDTH, backgroundColor: DEVICE_SCREEN_BACKGROUND_COLOR, borderRadius: utils.borders.radii.large / 2, @@ -91,12 +91,12 @@ export const UnverifiedAddressDevice = ({ }; return ( - + diff --git a/suite-native/receive/src/components/UnverifiedAddressDeviceHint.tsx b/suite-native/receive/src/components/UnverifiedAddressDeviceHint.tsx index f2d9c34e861..52fd92ed795 100644 --- a/suite-native/receive/src/components/UnverifiedAddressDeviceHint.tsx +++ b/suite-native/receive/src/components/UnverifiedAddressDeviceHint.tsx @@ -19,7 +19,7 @@ export const UnverifiedAddressDeviceHint = () => { return ( - + diff --git a/suite-native/receive/src/components/UnverifiedAddressWarning.tsx b/suite-native/receive/src/components/UnverifiedAddressWarning.tsx index f4de582782f..4452240515c 100644 --- a/suite-native/receive/src/components/UnverifiedAddressWarning.tsx +++ b/suite-native/receive/src/components/UnverifiedAddressWarning.tsx @@ -37,7 +37,7 @@ export const UnverifiedAddressWarning = () => { const pictogramContentKey = isPortfolioTrackerDevice ? 'portfolioTracker' : 'viewOnly'; return ( - + ({ - padding: utils.spacings.small, + padding: utils.spacings.sp8, })); const LoadingReceiveAccount = () => { const { applyStyle } = useNativeStyles(); return ( - + - + @@ -93,7 +93,7 @@ const ReceiveModalScreenSubHeader = ({ accountKey, tokenContract }: ScreenSubHea values={{ coinSymbol: networkSymbol?.toUpperCase() }} /> - + {networkSymbol && } {accountLabel && ( diff --git a/suite-native/toasts/src/components/Toast.tsx b/suite-native/toasts/src/components/Toast.tsx index 422d5200374..7dca6eaa72e 100644 --- a/suite-native/toasts/src/components/Toast.tsx +++ b/suite-native/toasts/src/components/Toast.tsx @@ -26,15 +26,15 @@ type ToastStyle = { const ToastContainerStyle = prepareNativeStyle<{ backgroundColor: Color; hasIcon: boolean }>( (utils, { backgroundColor, hasIcon }) => ({ backgroundColor: utils.colors[backgroundColor], - paddingVertical: utils.spacings.extraSmall, - paddingLeft: utils.spacings.extraSmall, - paddingRight: utils.spacings.medium, + paddingVertical: utils.spacings.sp4, + paddingLeft: utils.spacings.sp4, + paddingRight: utils.spacings.sp16, borderRadius: utils.borders.radii.round, extend: [ { condition: !hasIcon, style: { - paddingLeft: utils.spacings.medium, + paddingLeft: utils.spacings.sp16, paddingVertical: 14, }, }, diff --git a/suite-native/toasts/src/components/ToastRenderer.tsx b/suite-native/toasts/src/components/ToastRenderer.tsx index e523d7afac5..77b07fa2f84 100644 --- a/suite-native/toasts/src/components/ToastRenderer.tsx +++ b/suite-native/toasts/src/components/ToastRenderer.tsx @@ -13,7 +13,7 @@ const toastsContainerStyle = prepareNativeStyle<{ topSafeAreaInset: number }>( position: 'absolute', justifyContent: 'center', marginTop: topSafeAreaInset, - paddingHorizontal: utils.spacings.medium, + paddingHorizontal: utils.spacings.sp16, }), ); diff --git a/suite-native/transactions/src/components/TransactionDetail/NetworkTransactionDetailSummary.tsx b/suite-native/transactions/src/components/TransactionDetail/NetworkTransactionDetailSummary.tsx index acde7d96a17..a0dcfcc4a1f 100644 --- a/suite-native/transactions/src/components/TransactionDetail/NetworkTransactionDetailSummary.tsx +++ b/suite-native/transactions/src/components/TransactionDetail/NetworkTransactionDetailSummary.tsx @@ -76,7 +76,7 @@ export const NetworkTransactionDetailSummary = ({ } return ( - + {A.isNotEmpty(transactionInputAddresses) && ( ({ flexDirection: 'row', - marginLeft: utils.spacings.extraLarge, + marginLeft: utils.spacings.sp32, })); const showMoreButtonStyle = prepareNativeStyle(_ => ({ flexDirection: 'row' })); const hiddenTransactionsCountStyle = prepareNativeStyle(utils => ({ justifyContent: 'center', - marginLeft: utils.spacings.small, + marginLeft: utils.spacings.sp8, backgroundColor: utils.colors.backgroundNeutralSubtleOnElevation1, borderRadius: utils.borders.radii.round, - paddingHorizontal: utils.spacings.small, - paddingVertical: utils.spacings.small / 4, + paddingHorizontal: utils.spacings.sp8, + paddingVertical: utils.spacings.sp8 / 4, })); const addressTextStyle = prepareNativeStyle(_ => ({ @@ -43,21 +43,21 @@ const stepperDotWrapperStyle = prepareNativeStyle(utils => ({ alignItems: 'center', marginTop: 12, backgroundColor: utils.colors.backgroundSurfaceElevation2, - width: utils.spacings.medium, - height: utils.spacings.medium, + width: utils.spacings.sp16, + height: utils.spacings.sp16, borderRadius: utils.borders.radii.round, })); const stepperDotStyle = prepareNativeStyle(utils => ({ - width: utils.spacings.extraSmall, - height: utils.spacings.extraSmall, + width: utils.spacings.sp4, + height: utils.spacings.sp4, borderRadius: utils.borders.radii.round, backgroundColor: utils.colors.backgroundNeutralSubdued, })); const coinIconWrapperStyle = prepareNativeStyle(utils => ({ alignSelf: 'flex-start', - padding: utils.spacings.small * 1.5, + padding: utils.spacings.sp8 * 1.5, backgroundColor: utils.colors.backgroundSurfaceElevation2, borderRadius: utils.borders.radii.round, })); @@ -135,7 +135,7 @@ export const TransactionDetailAddressesSection = ({ {areChangeAddressesVisible && ( <> - + }> diff --git a/suite-native/transactions/src/components/TransactionDetail/TransactionDetailAddressesSheet.tsx b/suite-native/transactions/src/components/TransactionDetail/TransactionDetailAddressesSheet.tsx index e1f8938d474..9eb4be0c491 100644 --- a/suite-native/transactions/src/components/TransactionDetail/TransactionDetailAddressesSheet.tsx +++ b/suite-native/transactions/src/components/TransactionDetail/TransactionDetailAddressesSheet.tsx @@ -26,8 +26,8 @@ const addressStyle = prepareNativeStyle(_ => ({ maxWidth: '90%' })); const copyContainerStyle = prepareNativeStyle(utils => ({ flex: 1, - paddingTop: utils.spacings.extraSmall, - marginHorizontal: utils.spacings.small, + paddingTop: utils.spacings.sp4, + marginHorizontal: utils.spacings.sp8, })); export const formatAddressLabel = (addressType: AddressesType, count: number) => { @@ -60,7 +60,7 @@ const AddressRow = ({ address }: { address: string }) => { const AddressesListCard = ({ addresses }: { addresses: VinVoutAddress[] }) => ( - + {addresses.map(({ address }) => ( ))} @@ -112,8 +112,8 @@ export const TransactionDetailAddressesSheet = ({ leftLabel={formatAddressLabel('inputs', inputAddresses.length)} rightLabel={formatAddressLabel('outputs', outputAddresses.length)} /> - - + + {A.isNotEmpty(changeAddresses) && ( @@ -123,7 +123,7 @@ export const TransactionDetailAddressesSheet = ({ )} - + diff --git a/suite-native/transactions/src/components/TransactionDetail/TransactionDetailData.tsx b/suite-native/transactions/src/components/TransactionDetail/TransactionDetailData.tsx index 8d190a361e0..ee8c8b84155 100644 --- a/suite-native/transactions/src/components/TransactionDetail/TransactionDetailData.tsx +++ b/suite-native/transactions/src/components/TransactionDetail/TransactionDetailData.tsx @@ -62,7 +62,7 @@ export const TransactionDetailData = ({ const hasIncludedCoins = isMultiTokenTransaction || isNetworkTransactionWithTokens; return ( - + {isPhishingTransaction && ( )} - + ({ - marginTop: -utils.spacings.extraSmall, + marginTop: -utils.spacings.sp4, })); export const TransactionDetailHeader = ({ @@ -49,7 +49,7 @@ export const TransactionDetailHeader = ({ return ( - + - + {title} diff --git a/suite-native/transactions/src/components/TransactionDetail/TransactionDetailInputsSheet.tsx b/suite-native/transactions/src/components/TransactionDetail/TransactionDetailInputsSheet.tsx index 47d7d030140..fdb992c4aab 100644 --- a/suite-native/transactions/src/components/TransactionDetail/TransactionDetailInputsSheet.tsx +++ b/suite-native/transactions/src/components/TransactionDetail/TransactionDetailInputsSheet.tsx @@ -26,21 +26,21 @@ type InputsOutputsHeaderProps = { }; const InputsOutputsHeader = ({ inputsCount, outputsCount }: InputsOutputsHeaderProps) => ( - - + + Inputs · {inputsCount} - + - + Outputs · {outputsCount} - + diff --git a/suite-native/transactions/src/components/TransactionDetail/TransactionDetailInputsSheetSection.tsx b/suite-native/transactions/src/components/TransactionDetail/TransactionDetailInputsSheetSection.tsx index 94605c0784b..cf89f9150b8 100644 --- a/suite-native/transactions/src/components/TransactionDetail/TransactionDetailInputsSheetSection.tsx +++ b/suite-native/transactions/src/components/TransactionDetail/TransactionDetailInputsSheetSection.tsx @@ -73,7 +73,7 @@ export const TransactionDetailInputsSheetSection = ({ return ( {G.isString(header) ? ( - + {header} diff --git a/suite-native/transactions/src/components/TransactionDetail/TransactionDetailListItem.tsx b/suite-native/transactions/src/components/TransactionDetail/TransactionDetailListItem.tsx index 86cc0a3aad9..c8823af4318 100644 --- a/suite-native/transactions/src/components/TransactionDetail/TransactionDetailListItem.tsx +++ b/suite-native/transactions/src/components/TransactionDetail/TransactionDetailListItem.tsx @@ -63,7 +63,7 @@ export const TransactionDetailListItem = ({ style={applyStyle(transactionListItemContainerStyle, { isFirst, isLast })} > - + diff --git a/suite-native/transactions/src/components/TransactionDetail/TransactionDetailParametersSheet.tsx b/suite-native/transactions/src/components/TransactionDetail/TransactionDetailParametersSheet.tsx index b2655aaf0c4..d50b9717698 100644 --- a/suite-native/transactions/src/components/TransactionDetail/TransactionDetailParametersSheet.tsx +++ b/suite-native/transactions/src/components/TransactionDetail/TransactionDetailParametersSheet.tsx @@ -95,13 +95,13 @@ export const TransactionDetailParametersSheet = ({ - + - + diff --git a/suite-native/transactions/src/components/TransactionDetail/TransactionDetailSheet.tsx b/suite-native/transactions/src/components/TransactionDetail/TransactionDetailSheet.tsx index af5aabb22e1..44d6f2a98f1 100644 --- a/suite-native/transactions/src/components/TransactionDetail/TransactionDetailSheet.tsx +++ b/suite-native/transactions/src/components/TransactionDetail/TransactionDetailSheet.tsx @@ -34,7 +34,7 @@ const BottomSheetTrigger = ({ return ( - + {title} @@ -61,9 +61,9 @@ export const TransactionDetailSheet = ({ title={title} subtitle={`Transaction #${transactionId}`} > - + {children} - + diff --git a/suite-native/transactions/src/components/TransactionDetail/TransactionDetailSheets.tsx b/suite-native/transactions/src/components/TransactionDetail/TransactionDetailSheets.tsx index f15cb08b524..793f109476f 100644 --- a/suite-native/transactions/src/components/TransactionDetail/TransactionDetailSheets.tsx +++ b/suite-native/transactions/src/components/TransactionDetail/TransactionDetailSheets.tsx @@ -49,7 +49,7 @@ export const TransactionDetailSheets = ({ return ( - + {leftComponent} - + {children} diff --git a/suite-native/transactions/src/components/TransactionsEmptyState.tsx b/suite-native/transactions/src/components/TransactionsEmptyState.tsx index 5574a8593a9..f0b727a9f10 100644 --- a/suite-native/transactions/src/components/TransactionsEmptyState.tsx +++ b/suite-native/transactions/src/components/TransactionsEmptyState.tsx @@ -17,8 +17,8 @@ const cardStyle = prepareNativeStyle(utils => ({ alignItems: 'center', flex: 1, width: '100%', - paddingHorizontal: utils.spacings.large, - paddingVertical: utils.spacings.extraLarge, + paddingHorizontal: utils.spacings.sp24, + paddingVertical: utils.spacings.sp32, borderRadius: utils.borders.radii.large, })); @@ -38,7 +38,7 @@ export const TransactionsEmptyState = ({ accountKey }: { accountKey: string }) = return ( - + ({ - paddingHorizontal: utils.spacings.small, + paddingHorizontal: utils.spacings.sp8, flex: 1, })); const sectionListContainerStyle = prepareNativeStyle(utils => ({ - paddingVertical: utils.spacings.small, + paddingVertical: utils.spacings.sp8, })); const sortKeysPendingFirst = (a: string, b: string) => { diff --git a/suite-native/transactions/src/components/TransactionsList/TransactionListGroupTitle.tsx b/suite-native/transactions/src/components/TransactionsList/TransactionListGroupTitle.tsx index a067629ede1..9c8c61c92ba 100644 --- a/suite-native/transactions/src/components/TransactionsList/TransactionListGroupTitle.tsx +++ b/suite-native/transactions/src/components/TransactionsList/TransactionListGroupTitle.tsx @@ -8,8 +8,8 @@ type TransactionListGroupProps = { }; const dateTextStyle = prepareNativeStyle(utils => ({ - marginVertical: utils.spacings.medium, - marginHorizontal: utils.spacings.medium, + marginVertical: utils.spacings.sp16, + marginHorizontal: utils.spacings.sp16, })); export const TransactionListGroupTitle = ({ monthKey }: TransactionListGroupProps) => { @@ -21,7 +21,7 @@ export const TransactionListGroupTitle = ({ monthKey }: TransactionListGroupProp : MonthNameFormatter.format(parseTransactionMonthKey(monthKey)); return ( - + {sectionTitle} diff --git a/suite-native/transactions/src/components/TransactionsList/TransactionListItemContainer.tsx b/suite-native/transactions/src/components/TransactionsList/TransactionListItemContainer.tsx index 34a99c5f38a..3967ddec38a 100644 --- a/suite-native/transactions/src/components/TransactionsList/TransactionListItemContainer.tsx +++ b/suite-native/transactions/src/components/TransactionsList/TransactionListItemContainer.tsx @@ -64,15 +64,15 @@ export const transactionListItemContainerStyle = prepareNativeStyle ({ flexDirection: 'row', - gap: utils.spacings.small, + gap: utils.spacings.sp8, })); const descriptionBoxStyle = prepareNativeStyle(_ => ({ @@ -104,7 +104,7 @@ const descriptionBoxStyle = prepareNativeStyle(_ => ({ export const valuesContainerStyle = prepareNativeStyle(utils => ({ flexShrink: 0, alignItems: 'flex-end', - marginLeft: utils.spacings.small, + marginLeft: utils.spacings.sp8, maxWidth: '40%', })); @@ -183,8 +183,8 @@ export const TransactionListItemContainer = ({ isAnimated={isTransactionPending} iconColor={iconColor} /> - - + + {transactionTitle} {isPhishingTransaction && ( diff --git a/suite-native/transactions/src/screens/TransactionDetailScreen.tsx b/suite-native/transactions/src/screens/TransactionDetailScreen.tsx index 0db7ea50bf8..71eab0cadd9 100644 --- a/suite-native/transactions/src/screens/TransactionDetailScreen.tsx +++ b/suite-native/transactions/src/screens/TransactionDetailScreen.tsx @@ -71,7 +71,7 @@ export const TransactionDetailScreen = ({ return ( } > - - + +