-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feat][CM-679] [Sale Widget] Add Handover screens + user initiated Tr…
…ansaction flow (#1879)
- Loading branch information
1 parent
88be74d
commit 39bd920
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.