-
-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(suite-native): enhance layout of the account import summary screen
- Loading branch information
Showing
6 changed files
with
160 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 0 additions & 80 deletions
80
suite-native/module-accounts-import/src/components/AccountImportSummary.tsx
This file was deleted.
Oops, something went wrong.
49 changes: 49 additions & 0 deletions
49
suite-native/module-accounts-import/src/components/AccountImportSummaryScreen.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import { ReactNode } from 'react'; | ||
import { KeyboardAvoidingView, Platform } from 'react-native'; | ||
|
||
import { Box, PictogramTitleHeader, VStack } from '@suite-native/atoms'; | ||
import { Screen } from '@suite-native/navigation'; | ||
|
||
import { AccountImportSubHeader } from './AccountImportSubHeader'; | ||
|
||
type AccountImportSummaryScreenProps = { | ||
children: ReactNode; | ||
title: ReactNode; | ||
subtitle?: ReactNode; | ||
footer: ReactNode; | ||
testID?: string; | ||
}; | ||
|
||
export const AccountImportSummaryScreen = ({ | ||
children, | ||
title, | ||
subtitle, | ||
footer, | ||
testID, | ||
}: AccountImportSummaryScreenProps) => { | ||
return ( | ||
<Screen | ||
customHorizontalPadding="sp16" | ||
screenHeader={<AccountImportSubHeader />} | ||
footer={ | ||
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'padding' : 'height'}> | ||
<Box margin="sp16">{footer}</Box> | ||
</KeyboardAvoidingView> | ||
} | ||
> | ||
<VStack spacing="sp32" flex={1}> | ||
<Box flex={1} alignItems="center" justifyContent="center"> | ||
<PictogramTitleHeader | ||
title={title} | ||
subtitle={subtitle} | ||
variant="green" | ||
icon="coinVerticalCheck" | ||
/> | ||
</Box> | ||
<Box flex={1} justifyContent="flex-end" testID={testID}> | ||
{children} | ||
</Box> | ||
</VStack> | ||
</Screen> | ||
); | ||
}; |
Oops, something went wrong.