diff --git a/config/mocks/wallet-options-v4.json b/config/mocks/wallet-options-v4.json index db06ca43c94..1135aba2b80 100644 --- a/config/mocks/wallet-options-v4.json +++ b/config/mocks/wallet-options-v4.json @@ -45,7 +45,7 @@ "recurringBuys": true, "isRedesignEnabled": true, "signupCountry": true, - "taxCenter": false, + "taxCenter": true, "tradingCurrencyFlyout": true, "useNewPaymentProviders": true, "walletConnect": true, diff --git a/packages/blockchain-info-components/index.d.ts b/packages/blockchain-info-components/index.d.ts index f24b42f8d73..af91cd612b3 100644 --- a/packages/blockchain-info-components/index.d.ts +++ b/packages/blockchain-info-components/index.d.ts @@ -277,3 +277,15 @@ export const CheckBoxInput: FunctionComponent<{ onClick?: () => void onChange?: () => void }> +export const SelectInput: FunctionComponent<{ + disabled?: boolean, + elements?: Array, + grouped?: boolean, + label?: string | unknown, + onBlur?: () => void, + onChange?: () => void, + onFocus?: () => void, + opened?: boolean, + searchEnabled?: boolean, + value: string | boolean | number +}> diff --git a/packages/blockchain-wallet-v4-frontend/src/components/CircleBackground/index.tsx b/packages/blockchain-wallet-v4-frontend/src/components/CircleBackground/index.tsx new file mode 100644 index 00000000000..2d7a989b842 --- /dev/null +++ b/packages/blockchain-wallet-v4-frontend/src/components/CircleBackground/index.tsx @@ -0,0 +1,15 @@ +import styled from 'styled-components' + +const CircleBackground = styled.div<{ color?: string; size?: string }>` + display: flex; + justify-content: center; + align-items: center; + width: ${({ size = '40px' }) => size}; + height: ${({ size = '40px' }) => size}; + min-width: ${({ size = '40px' }) => size}; + background-color: ${({ color, theme }) => (color ? theme[color] : theme.blue000)}; + border-radius: ${({ size = '40px' }) => size}; + margin: 8px; +` + +export default CircleBackground diff --git a/packages/blockchain-wallet-v4-frontend/src/scenes/Help/index.tsx b/packages/blockchain-wallet-v4-frontend/src/scenes/Help/index.tsx index 17cc4d67840..f03aa55ce51 100644 --- a/packages/blockchain-wallet-v4-frontend/src/scenes/Help/index.tsx +++ b/packages/blockchain-wallet-v4-frontend/src/scenes/Help/index.tsx @@ -4,6 +4,7 @@ import { LinkContainer } from 'react-router-bootstrap' import styled from 'styled-components' import { Icon, Link, Text } from 'blockchain-info-components' +import CircleBackground from 'components/CircleBackground' import { Wrapper } from 'components/Public' import { media } from 'services/styles' @@ -51,15 +52,7 @@ const IconTextRow = styled.div` cursor: pointer; ` -const CircleBackground = styled.div` - display: flex; - justify-content: center; - align-items: center; - width: 48px; - height: 48px; - min-width: 48px; - background-color: ${(props) => props.theme.blue000}; - border-radius: 48px; +const StyledCircle = styled(CircleBackground)` margin: 8px 16px 8px 0; ` @@ -119,9 +112,9 @@ const Help = () => { - + - + { - + - + diff --git a/packages/blockchain-wallet-v4-frontend/src/scenes/HelpExchange/index.tsx b/packages/blockchain-wallet-v4-frontend/src/scenes/HelpExchange/index.tsx index 4e34e88ac73..acd235d5dbe 100644 --- a/packages/blockchain-wallet-v4-frontend/src/scenes/HelpExchange/index.tsx +++ b/packages/blockchain-wallet-v4-frontend/src/scenes/HelpExchange/index.tsx @@ -4,6 +4,7 @@ import { LinkContainer } from 'react-router-bootstrap' import styled from 'styled-components' import { Icon, Link, Text } from 'blockchain-info-components' +import CircleBackground from 'components/CircleBackground' import { Wrapper } from 'components/Public' import { media } from 'services/styles' @@ -76,15 +77,7 @@ const IconTextRow = styled.div` cursor: pointer; ` -const CircleBackground = styled.div` - display: flex; - justify-content: center; - align-items: center; - width: 48px; - height: 48px; - min-width: 48px; - background-color: ${(props) => props.theme.blue000}; - border-radius: 48px; +const StyledCircle = styled(CircleBackground)` margin: 8px 16px 8px 0; ` @@ -133,9 +126,9 @@ class Help extends React.PureComponent { - + - + { target='_blank' > - + - + ( + +
+ + + {number} + + + + {title} + +
+ + {description} + + {children} +
+) + +type Props = { + children: ReactElement + description: ReactElement + number: number + title: ReactElement +} + +export default Card diff --git a/packages/blockchain-wallet-v4-frontend/src/scenes/TaxCenter/components/Card/index.tsx b/packages/blockchain-wallet-v4-frontend/src/scenes/TaxCenter/components/Card/index.tsx new file mode 100644 index 00000000000..95cfda28ea2 --- /dev/null +++ b/packages/blockchain-wallet-v4-frontend/src/scenes/TaxCenter/components/Card/index.tsx @@ -0,0 +1 @@ +export { default } from './Card' diff --git a/packages/blockchain-wallet-v4-frontend/src/scenes/TaxCenter/components/index.tsx b/packages/blockchain-wallet-v4-frontend/src/scenes/TaxCenter/components/index.tsx new file mode 100644 index 00000000000..03fa782ed13 --- /dev/null +++ b/packages/blockchain-wallet-v4-frontend/src/scenes/TaxCenter/components/index.tsx @@ -0,0 +1 @@ +export { default as Card } from './Card' diff --git a/packages/blockchain-wallet-v4-frontend/src/scenes/TaxCenter/model.tsx b/packages/blockchain-wallet-v4-frontend/src/scenes/TaxCenter/model.tsx index 19c135be509..2ce2e317e11 100644 --- a/packages/blockchain-wallet-v4-frontend/src/scenes/TaxCenter/model.tsx +++ b/packages/blockchain-wallet-v4-frontend/src/scenes/TaxCenter/model.tsx @@ -1,6 +1,7 @@ import styled from 'styled-components' -import { Text } from 'blockchain-info-components' +import { Button, SelectInput, Text } from 'blockchain-info-components' +import { SceneWrapper } from 'components/Layout' import MenuHeader from 'components/MenuHeader' export const Title = styled(Text)` @@ -10,3 +11,57 @@ export const Title = styled(Text)` export const MenuHeaderCentered = styled(MenuHeader)` align-items: center; ` + +export const Box = styled.div` + position: relative; + margin-top: 64px; + padding: 24px; + border-radius: 8px; + border: 1px solid ${(props) => props.theme.grey000}; + display: flex; + flex: 1; +` + +export const Slide = styled.div` + width: 100%; + display: flex; + flex-direction: column; + flex: 1; +` + +export const Container = styled(SceneWrapper)` + padding: 0 8px; +` + +export const Footer = styled.div` + padding: 24px; + height: 300px; + text-align: center; +` +export const Content = styled.div` + display: flex; + align-items: center; +` + +export const SelectGroup = styled.div` + height: 75px; +` + +export const StyledSelect = styled(SelectInput)` + width: 172px; + margin-right: 16px; +` + +export const SelectLabel = styled(Text)` + margin-bottom: 8px; +` + +export const GenerateButton = styled(Button)` + margin-top: 24px; + height: 48px; +` + +export const VisitButton = styled(Button)` + margin-top: 16px; + height: 48px; +` diff --git a/packages/blockchain-wallet-v4-frontend/src/scenes/TaxCenter/template.tsx b/packages/blockchain-wallet-v4-frontend/src/scenes/TaxCenter/template.tsx index 18352550e50..158e4cc18c2 100644 --- a/packages/blockchain-wallet-v4-frontend/src/scenes/TaxCenter/template.tsx +++ b/packages/blockchain-wallet-v4-frontend/src/scenes/TaxCenter/template.tsx @@ -1,30 +1,174 @@ import React from 'react' import { FormattedMessage } from 'react-intl' -import { Text } from 'blockchain-info-components' -import { SceneWrapper, StickyHeader } from 'components/Layout' +import { Carousel, Link, Text, TextGroup } from 'blockchain-info-components' -import { MenuHeaderCentered, Title } from './model' +import { Card } from './components' +import { + Box, + Container, + Content, + Footer, + GenerateButton, + MenuHeaderCentered, + SelectGroup, + SelectLabel, + Slide, + StyledSelect, + Title, + VisitButton +} from './model' const TaxCenter = () => ( - - - - + <Container> + <MenuHeaderCentered> + <Title size='40px' weight={600} color='black'> + <FormattedMessage id='scenes.tax.center.title' defaultMessage='Blockchain.com Tax Center' /> + + + + + + + + + + <FormattedMessage + id='scenes.tax.center.carousel.taxes' + defaultMessage='Do I owe taxes on my crypto?' + /> + + + + + + + + <FormattedMessage + id='scenes.tax.center.carousel.file' + defaultMessage='How do I file?' + /> + + + + + + + + <FormattedMessage + id='scenes.tax.center.carousel.services' + defaultMessage='What if I use other crypto services?' + /> + + + + + + + + + + + + + + + + } + number={1} + title={ + + } + > + + + + + + {}} /> + + {}} + > - - + + + + + } + number={2} + title={ + + } + > + {}}> + + + + + ) export default TaxCenter