-
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.
Merge pull request #1596 from blockchain/feat/pax-whatsnew
feat: add pax to whats new
- Loading branch information
Showing
3 changed files
with
93 additions
and
1 deletion.
There are no files selected for viewing
68 changes: 68 additions & 0 deletions
68
...ages/blockchain-wallet-v4-frontend/src/services/WhatsNewService/WhatsNewContent/USDPax.js
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,68 @@ | ||
import React from 'react' | ||
import styled from 'styled-components' | ||
import { FormattedMessage } from 'react-intl' | ||
import { LinkContainer } from 'react-router-bootstrap' | ||
import { Button, Text } from 'blockchain-info-components' | ||
import { Container, Row } from 'components/WhatsNew' | ||
import media from 'services/ResponsiveService' | ||
|
||
const DarkText = styled(Text).attrs({ | ||
color: 'gray-5', | ||
size: '16px', | ||
weight: 300 | ||
})` | ||
display: inline; | ||
${media.laptop` | ||
display: ${props => (props.hideOnMobile ? 'none' : 'inline')}; | ||
`}; | ||
` | ||
const GetStartedButton = styled(Button).attrs({ | ||
nature: 'primary', | ||
fullwidth: true | ||
})` | ||
font-weight: 500; | ||
${media.laptop` | ||
width: 100%; | ||
`}; | ||
` | ||
|
||
export const USDPax = () => ( | ||
<Container> | ||
<Row marginBottom='10px'> | ||
<Text color='brand-primary' size='24px' weight={600}> | ||
<FormattedMessage | ||
defaultMessage='A Digital US Dollar in Your Wallet' | ||
id='layouts.wallet.trayright.whatsnew.whatsnewcontent.usdpax.one' | ||
/> | ||
</Text> | ||
</Row> | ||
<Row marginBottom='24px'> | ||
<DarkText size='14px'> | ||
<FormattedMessage | ||
defaultMessage='April 2019' | ||
id='layouts.wallet.trayright.whatsnew.whatsnewcontent.usdpax.april2019' | ||
/> | ||
</DarkText> | ||
</Row> | ||
<Row marginBottom='24px'> | ||
<DarkText> | ||
<FormattedMessage | ||
defaultMessage='USD PAX, a crypto backed 1:1 for the dollar, is now available in your web wallet to trade and transact with. You can use these digital dollars to de-risk in a moving market, manage inflation of your local currency, or move quickly between cryptos in your wallet. 1 $PAX = 1 $USD, always.' | ||
id='layouts.wallet.trayright.whatsnew.whatsnewcontent.usdpax.stable' | ||
/> | ||
</DarkText> | ||
</Row> | ||
<Row> | ||
<LinkContainer to='/pax/transactions'> | ||
<GetStartedButton> | ||
<FormattedMessage | ||
id='layouts.wallet.trayright.whatsnew.whatsnewcontent.usdpax.checkit' | ||
defaultMessage='Check it Out!' | ||
/> | ||
</GetStartedButton> | ||
</LinkContainer> | ||
</Row> | ||
</Container> | ||
) | ||
|
||
export default USDPax |
17 changes: 17 additions & 0 deletions
17
...blockchain-wallet-v4-frontend/src/services/WhatsNewService/WhatsNewContent/USDPax.spec.js
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,17 @@ | ||
import React from 'react' | ||
import { shallow } from 'enzyme' | ||
import toJson from 'enzyme-to-json' | ||
import USDPax from './USDPax' | ||
|
||
jest.mock('blockchain-info-components', () => ({ | ||
Text: 'text', | ||
Button: 'button' | ||
})) | ||
|
||
describe('EmptyContent', () => { | ||
it('renders correctly', () => { | ||
const component = shallow(<USDPax />) | ||
const tree = toJson(component) | ||
expect(tree).toMatchSnapshot() | ||
}) | ||
}) |
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