-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into debug-browser-191-sign-msg
- Loading branch information
Showing
18 changed files
with
1,072 additions
and
232 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
39 changes: 17 additions & 22 deletions
39
packages/checkout/widgets-lib/src/components/Handover/HandoverAnimation.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
87 changes: 87 additions & 0 deletions
87
packages/checkout/widgets-lib/src/components/Handover/HandoverContent.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,87 @@ | ||
import { | ||
Body, Box, Button, Heading, | ||
} from '@biom3/react'; | ||
|
||
export function HandoverContent({ | ||
headingText, | ||
subheadingText, | ||
primaryButtonText, | ||
onPrimaryButtonClick, | ||
secondaryButtonText, | ||
onSecondaryButtonClick, | ||
}: { | ||
headingText: string; | ||
subheadingText?: string; | ||
primaryButtonText?: string; | ||
onPrimaryButtonClick?: () => void; | ||
secondaryButtonText?: string; | ||
onSecondaryButtonClick?: () => void; | ||
}) { | ||
return ( | ||
<Box | ||
sx={{ | ||
height: '100%', | ||
display: 'flex', | ||
flexDirection: 'column', | ||
justifyContent: 'space-between', | ||
}} | ||
> | ||
<Box> | ||
<Heading sx={{ paddingBottom: 'base.spacing.x4' }}> | ||
{headingText} | ||
</Heading> | ||
|
||
<Body | ||
size="small" | ||
sx={{ | ||
textAlign: 'center', | ||
color: 'base.color.text.body.secondary', | ||
}} | ||
> | ||
{subheadingText} | ||
</Body> | ||
</Box> | ||
|
||
<Box> | ||
{primaryButtonText && onPrimaryButtonClick && ( | ||
<Box | ||
sx={{ | ||
paddingBottom: 'base.spacing.x2', | ||
}} | ||
> | ||
<Button | ||
sx={{ | ||
width: '100%', | ||
}} | ||
variant="primary" | ||
size="large" | ||
testId="handover-primary-button" | ||
onClick={onPrimaryButtonClick} | ||
> | ||
{primaryButtonText} | ||
</Button> | ||
</Box> | ||
)} | ||
{secondaryButtonText && onSecondaryButtonClick && ( | ||
<Box | ||
sx={{ | ||
paddingBottom: 'base.spacing.x4', | ||
}} | ||
> | ||
<Button | ||
sx={{ | ||
width: '100%', | ||
}} | ||
variant="tertiary" | ||
size="large" | ||
testId="handover-secondary-button" | ||
onClick={onSecondaryButtonClick} | ||
> | ||
{secondaryButtonText} | ||
</Button> | ||
</Box> | ||
)} | ||
</Box> | ||
</Box> | ||
); | ||
} |
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
Oops, something went wrong.