This repository has been archived by the owner on May 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding new TOS to Rewards UI Enabling points
- Loading branch information
Showing
18 changed files
with
593 additions
and
176 deletions.
There are no files selected for viewing
86 changes: 86 additions & 0 deletions
86
src/features/rewards/disabledBox/__snapshots__/spec.tsx.snap
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,86 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`DisabledBox tests basic tests matches the snapshot 1`] = ` | ||
.c2 { | ||
max-width: 100%; | ||
width: 100%; | ||
min-height: auto; | ||
margin: 0; | ||
padding: 30px 36px; | ||
background-color: #fff; | ||
border-radius: 6px; | ||
box-shadow: 0 1px 12px 0 rgba(99,105,110,0.18); | ||
font-size: inherit; | ||
box-sizing: border-box; | ||
position: relative; | ||
} | ||
.c0 { | ||
display: block; | ||
width: 100%; | ||
margin-bottom: 28px; | ||
} | ||
.c1 { | ||
font-family: Poppins,sans-serif; | ||
} | ||
.c3 { | ||
width: 541px; | ||
color: #4C54D2; | ||
font-size: 22px; | ||
font-weight: 600; | ||
-webkit-letter-spacing: 0; | ||
-moz-letter-spacing: 0; | ||
-ms-letter-spacing: 0; | ||
letter-spacing: 0; | ||
line-height: 28px; | ||
padding-bottom: 5px; | ||
} | ||
.c4 { | ||
color: #84889c; | ||
font-size: 16px; | ||
font-weight: normal; | ||
-webkit-letter-spacing: 0; | ||
-moz-letter-spacing: 0; | ||
-ms-letter-spacing: 0; | ||
letter-spacing: 0; | ||
line-height: 26px; | ||
padding-bottom: 0px; | ||
font-family: Muli,sans-serif; | ||
} | ||
.c4:first-of-type { | ||
padding-bottom: 10px; | ||
} | ||
<div | ||
className="c0" | ||
> | ||
<div | ||
className="c1 c2" | ||
> | ||
<span | ||
className="c3" | ||
> | ||
MISSING: whyBraveRewards | ||
</span> | ||
<p | ||
className="c4" | ||
> | ||
MISSING: rewardsOffText5 | ||
</p> | ||
<span | ||
className="c3" | ||
> | ||
MISSING: rewardsOffText3 | ||
</span> | ||
<p | ||
className="c4" | ||
> | ||
MISSING: rewardsOffText4 | ||
</p> | ||
</div> | ||
</div> | ||
`; |
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,36 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
|
||
import * as React from 'react' | ||
import { | ||
StyledWrapper, | ||
StyledCard, | ||
StyledTitle, | ||
StyledText | ||
} from './style' | ||
import { getLocale } from '../../../helpers' | ||
|
||
export default class DisabledBox extends React.PureComponent<{}, {}> { | ||
render () { | ||
return ( | ||
<StyledWrapper> | ||
<StyledCard> | ||
<StyledTitle> | ||
{getLocale('whyBraveRewards')} | ||
</StyledTitle> | ||
<StyledText> | ||
{getLocale('rewardsOffText5')} | ||
</StyledText> | ||
<StyledTitle> | ||
{getLocale('rewardsOffText3')} | ||
</StyledTitle> | ||
<StyledText> | ||
{getLocale('rewardsOffText4')} | ||
</StyledText> | ||
</StyledCard> | ||
</StyledWrapper> | ||
) | ||
} | ||
} |
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,28 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
|
||
import * as React from 'react' | ||
import { shallow } from 'enzyme' | ||
import { create } from 'react-test-renderer' | ||
import DisabledBox from './index' | ||
import { TestThemeProvider } from '../../../theme' | ||
|
||
describe('DisabledBox tests', () => { | ||
const baseComponent = (props?: object) => <TestThemeProvider><DisabledBox id='disabledbox' {...props} /></TestThemeProvider> | ||
|
||
describe('basic tests', () => { | ||
it('matches the snapshot', () => { | ||
const component = baseComponent() | ||
const tree = create(component).toJSON() | ||
expect(tree).toMatchSnapshot() | ||
}) | ||
|
||
it('renders the component', () => { | ||
const wrapper = shallow(baseComponent()) | ||
const assertion = wrapper.find('#disabledbox').length | ||
expect(assertion).toBe(1) | ||
}) | ||
}) | ||
}) |
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,42 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
|
||
import styled from 'styled-components' | ||
import Card from '../../../components/layout/card' | ||
import palette from '../../../theme/colors' | ||
|
||
export const StyledWrapper = styled<{}, 'div'>('div')` | ||
display: block; | ||
width: 100%; | ||
margin-bottom: 28px; | ||
` | ||
|
||
export const StyledCard = styled(Card)` | ||
font-family: Poppins, sans-serif; | ||
` | ||
|
||
export const StyledTitle = styled<{}, 'span'>('span')` | ||
width: 541px; | ||
color: ${palette.blurple500}; | ||
font-size: 22px; | ||
font-weight: 600; | ||
letter-spacing: 0; | ||
line-height: 28px; | ||
padding-bottom: 5px; | ||
` | ||
|
||
export const StyledText = styled<{}, 'p'>('p')` | ||
color: ${palette.grey600}; | ||
font-size: 16px; | ||
font-weight: normal; | ||
letter-spacing: 0; | ||
line-height: 26px; | ||
padding-bottom: 0px; | ||
font-family: Muli, sans-serif; | ||
&:first-of-type { | ||
padding-bottom: 10px; | ||
} | ||
` |
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
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.