-
Notifications
You must be signed in to change notification settings - Fork 504
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(recurring buy): design updates, adding more components to storybook
- Loading branch information
1 parent
74d73aa
commit 92c7ce9
Showing
9 changed files
with
235 additions
and
47 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
45 changes: 45 additions & 0 deletions
45
packages/blockchain-info-components/src/Rows/OptionRightAction.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,45 @@ | ||
import React, { memo } from 'react' | ||
import styled from 'styled-components' | ||
|
||
import { Icon } from '../Icons' | ||
|
||
const Row = styled.div` | ||
padding: 16px 40px; | ||
box-sizing: border-box; | ||
border-top: 1px solid ${(props) => props.theme.grey000}; | ||
&:last-child { | ||
border-bottom: 1px solid ${(props) => props.theme.grey000}; | ||
} | ||
` | ||
const FlexWrapper = styled(Row)` | ||
display: flex; | ||
flex: 1; | ||
justify-content: space-between; | ||
align-items: center; | ||
padding-top: 0; | ||
padding-bottom: 0; | ||
cursor: pointer; | ||
& > div { | ||
height: 5rem; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
} | ||
` | ||
|
||
const OptionRightActionRow = ({ children, onClick }: Props) => { | ||
return ( | ||
<FlexWrapper role='button' onClick={onClick}> | ||
<div>{children}</div> | ||
<Icon name='chevron-right' size='25px' color='grey400' /> | ||
</FlexWrapper> | ||
) | ||
} | ||
|
||
type Props = { | ||
children: React.ReactChild | ||
onClick: () => void | ||
} | ||
|
||
export default OptionRightActionRow |
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
74 changes: 74 additions & 0 deletions
74
packages/blockchain-info-components/stories/chapters/flyoutCheckoutConfirm.stories.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,74 @@ | ||
import React from 'react' | ||
|
||
import { | ||
FlyoutContainer, | ||
FlyoutContent, | ||
FlyoutFooter, | ||
FlyoutHeader, | ||
AmountSubHeader, | ||
Button, | ||
CheckoutRow, | ||
Text, | ||
TextGroup, | ||
Link | ||
} from '../../src' | ||
|
||
export default { | ||
title: 'Flyouts/CheckoutConfirm', | ||
args: { | ||
'data-e2e': 'foooo', | ||
title: '10.0000 BTC', | ||
subTitle: '$100' | ||
}, | ||
} | ||
|
||
export const Default = (args) => ( | ||
<FlyoutContainer> | ||
<FlyoutHeader | ||
data-e2e="foooo" | ||
mode="back" | ||
onClick={() => {}} | ||
> | ||
Buy Bitcoin | ||
</FlyoutHeader> | ||
<FlyoutContent mode='top'> | ||
<AmountSubHeader {...args} /> | ||
<CheckoutRow | ||
title={'Exchange Rate'} | ||
text={'$30,000 / BTC'} | ||
toolTip={( | ||
<>Blockchain.com provides the best market price we receive and applies a spread.</> | ||
)} | ||
/> | ||
<CheckoutRow | ||
title={'Exchange Rate'} | ||
text={'$30,000 / BTC'} | ||
toolTip={( | ||
<>Blockchain.com provides the best market price we receive and applies a spread.</> | ||
)} | ||
/> | ||
<CheckoutRow | ||
title={'Exchange Rate'} | ||
text={'$30,000 / BTC'} | ||
toolTip={( | ||
<>Blockchain.com provides the best market price we receive and applies a spread.</> | ||
)} | ||
/> | ||
<CheckoutRow | ||
title={'Exchange Rate'} | ||
text={'$30,000 / BTC'} | ||
toolTip={( | ||
<>Blockchain.com provides the best market price we receive and applies a spread.</> | ||
)} | ||
/> | ||
</FlyoutContent> | ||
<FlyoutFooter> | ||
<Button | ||
fullwidth | ||
nature="primary" | ||
> | ||
Continue | ||
</Button> | ||
</FlyoutFooter> | ||
</FlyoutContainer> | ||
) |
58 changes: 58 additions & 0 deletions
58
packages/blockchain-info-components/stories/chapters/flyoutFrequencySelection.stories.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,58 @@ | ||
import React from 'react' | ||
|
||
import { | ||
FlyoutContainer, | ||
FlyoutContent, | ||
FlyoutHeader, | ||
Text, | ||
OptionRightActionRow | ||
} from '../../src' | ||
|
||
export default { | ||
title: 'Flyouts/FrequencySelection', | ||
} | ||
|
||
export const Default = (args) => ( | ||
<FlyoutContainer> | ||
<FlyoutHeader data-e2e='fooooooo' mode='back' onClick={close}> | ||
Buy $100 of BTC | ||
</FlyoutHeader> | ||
<FlyoutContent mode='top'> | ||
<OptionRightActionRow onClick={() => {}}> | ||
<Text weight={600} size='16px' color='grey900'> | ||
Daily | ||
</Text> | ||
</OptionRightActionRow> | ||
<OptionRightActionRow onClick={() => {}}> | ||
<> | ||
<Text weight={600} size='16px' color='grey900'> | ||
Weekly | ||
</Text> | ||
<Text weight={500} size='14px' color='grey600'> | ||
On Mondays | ||
</Text> | ||
</> | ||
</OptionRightActionRow> | ||
<OptionRightActionRow onClick={() => {}}> | ||
<> | ||
<Text weight={600} size='16px' color='grey900'> | ||
Monthly | ||
</Text> | ||
<Text weight={500} size='14px' color='grey600'> | ||
On the 14th | ||
</Text> | ||
</> | ||
</OptionRightActionRow> | ||
<OptionRightActionRow onClick={() => {}}> | ||
<> | ||
<Text weight={600} size='16px' color='grey900'> | ||
Twice a Month | ||
</Text> | ||
<Text weight={500} size='14px' color='grey600'> | ||
On the 14th and 28th | ||
</Text> | ||
</> | ||
</OptionRightActionRow> | ||
</FlyoutContent> | ||
</FlyoutContainer> | ||
) |
22 changes: 22 additions & 0 deletions
22
packages/blockchain-info-components/stories/chapters/optionRightActionRow.stories.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,22 @@ | ||
import React from 'react' | ||
|
||
import { OptionRightActionRow, Text } from '../../src' | ||
|
||
export default { | ||
title: 'Rows/OptionRightActionRow', | ||
component: OptionRightActionRow, | ||
} | ||
|
||
export const Default = (args) => ( | ||
<OptionRightActionRow {...args}> | ||
<> | ||
<Text weight={600} size='16px' color='grey900'> | ||
Daily | ||
</Text> | ||
<Text weight={500} size='14px' color='grey600'> | ||
at 9am | ||
</Text> | ||
</> | ||
</OptionRightActionRow> | ||
) | ||
|
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