Skip to content

Commit 4701fbf

Browse files
committed
fix(suite-native): use 16px padding as default for screen components
1 parent 29730ad commit 4701fbf

File tree

44 files changed

+128
-160
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+128
-160
lines changed

suite-native/accounts/src/components/SearchableAccountsListScreenHeader.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import Animated, {
77
withTiming,
88
} from 'react-native-reanimated';
99

10-
import { AddCoinFlowType, ScreenSubHeader } from '@suite-native/navigation';
1110
import { Box, IconButton } from '@suite-native/atoms';
11+
import { AddCoinFlowType, ScreenSubHeader } from '@suite-native/navigation';
1212
import { prepareNativeStyle, useNativeStyles } from '@trezor/styles';
1313

1414
import { AccountsSearchForm, SEARCH_INPUT_ANIMATION_DURATION } from './AccountsSearchForm';
@@ -21,11 +21,9 @@ type SearchableAccountsListScreenHeaderProps = {
2121
};
2222

2323
const HEADER_ANIMATION_DURATION = 100;
24-
export const SEARCH_FORM_CONTAINER_HEIGHT = 56;
2524

26-
const searchFormContainerStyle = prepareNativeStyle(utils => ({
27-
height: SEARCH_FORM_CONTAINER_HEIGHT,
28-
marginBottom: utils.spacings.sp16,
25+
const searchFormContainerStyle = prepareNativeStyle(_ => ({
26+
height: 48,
2927
}));
3028

3129
export const SearchableAccountsListScreenHeader = ({
@@ -78,7 +76,6 @@ export const SearchableAccountsListScreenHeader = ({
7876
exiting={FadeOut.duration(HEADER_ANIMATION_DURATION)}
7977
>
8078
<ScreenSubHeader
81-
customHorizontalPadding="sp16"
8279
content={title}
8380
rightIcon={
8481
<AddAccountButton

suite-native/coin-enabling/src/components/DiscoveryCoinsFilter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const DiscoveryCoinsFilter = ({
4747
allowChangeAnalytics={allowChangeAnalytics}
4848
/>
4949
))}
50-
<VStack paddingTop="sp8" paddingBottom="sp32" alignItems="center">
50+
<VStack paddingTop="sp8" paddingBottom="sp16" alignItems="center">
5151
<Icon name="question" color="textSubdued" size="large" />
5252
<Text color="textSubdued" textAlign="center">
5353
<Translation id="moduleSettings.coinEnabling.bottomNote" />

suite-native/coin-enabling/src/screens/CoinEnablingInitScreen.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,9 @@ export const CoinEnablingInitScreen = () => {
9898

9999
return (
100100
<Screen
101-
customHorizontalPadding={utils.spacings.sp16}
102101
screenHeader={
103102
<View style={applyStyle(headerWrapperStyle)}>
104-
<VStack paddingBottom="sp32" paddingHorizontal="sp16">
103+
<VStack paddingBottom="sp16" paddingHorizontal="sp16">
105104
<Text variant="titleSmall">
106105
<Translation id="moduleSettings.coinEnabling.initialSetup.title" />
107106
</Text>

suite-native/device-manager/src/components/DeviceManagerScreenHeader.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,8 @@ import { ScreenHeader } from '@suite-native/navigation';
22

33
import { DeviceManager } from './DeviceManager';
44

5-
type DeviceManagerScreenHeaderProps = {
6-
hasBottomPadding?: boolean;
7-
};
8-
9-
export const DeviceManagerScreenHeader = ({ hasBottomPadding }: DeviceManagerScreenHeaderProps) => (
10-
<ScreenHeader hasBottomPadding={hasBottomPadding}>
5+
export const DeviceManagerScreenHeader = () => (
6+
<ScreenHeader hasBottomPadding>
117
<DeviceManager />
128
</ScreenHeader>
139
);

suite-native/module-accounts-import/src/components/AccountImportSubHeader.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ export const AccountImportSubHeader = ({
1717

1818
return (
1919
<ScreenSubHeader
20-
customHorizontalPadding="sp16"
2120
closeActionType={closeActionType}
2221
closeAction={closeActionType === 'close' ? navigateToInitialScreen : undefined}
2322
content={translate('moduleAccountImport.title')}

suite-native/module-accounts-import/src/components/AccountImportSummaryScreen.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ export const AccountImportSummaryScreen = ({
2323
}: AccountImportSummaryScreenProps) => {
2424
return (
2525
<Screen
26-
customHorizontalPadding="sp16"
2726
screenHeader={<AccountImportSubHeader />}
2827
footer={
2928
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'padding' : 'height'}>

suite-native/module-accounts-import/src/screens/SelectNetworkScreen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const SelectNetworkScreen = ({
1919
};
2020

2121
return (
22-
<Screen screenHeader={<AccountImportSubHeader />} customHorizontalPadding="sp16">
22+
<Screen screenHeader={<AccountImportSubHeader />}>
2323
<SelectableNetworkList onSelectItem={handleSelectNetworkSymbol} />
2424
</Screen>
2525
);

suite-native/module-accounts-import/src/screens/XpubScanScreen.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,6 @@ export const XpubScanScreen = ({
177177
screenHeader={<AccountImportSubHeader closeActionType="back" />}
178178
footer={<XpubHint networkType={networkType} handleOpen={handleOpenHint} />}
179179
extraKeyboardAvoidingViewHeight={EXTRA_KEYBOARD_AVOIDING_VIEW_HEIGHT}
180-
customHorizontalPadding="sp16"
181-
customVerticalPadding="sp16"
182180
>
183181
<Card>
184182
<SelectableNetworkItem symbol={networkSymbol} />

suite-native/module-accounts-management/src/components/AccountDetailScreenHeader.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ export const AccountDetailScreenHeader = ({
3737

3838
return (
3939
<ScreenSubHeader
40-
customHorizontalPadding="sp16"
4140
content={accountLabel}
4241
rightIcon={
4342
<IconButton

suite-native/module-accounts-management/src/screens/AccountDetailContentScreen.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ export const AccountDetailContentScreen = ({
7070
)
7171
}
7272
// The padding is handled inside the TransactionList to prevent scrollbar glitches.
73-
customVerticalPadding={0}
74-
customHorizontalPadding={0}
73+
noTopPadding
74+
noHorizontalPadding
7575
isScrollable={false}
7676
>
7777
<TransactionList

0 commit comments

Comments
 (0)