-
Notifications
You must be signed in to change notification settings - Fork 141
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 #316 from onfido/feature/privacy-statement-cx-1711
Feature/privacy statement cx 1711
- Loading branch information
Showing
21 changed files
with
264 additions
and
23 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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,55 @@ | ||
import { h, Component} from 'preact' | ||
|
||
import theme from '../Theme/style.css' | ||
import style from './style.css' | ||
import Title from '../Title' | ||
import {preventDefaultOnClick} from '../utils' | ||
import {sendScreen} from '../../Tracker' | ||
import {parseI18nWithXmlTags} from '../../locales' | ||
|
||
const externalUrls = { | ||
terms: process.env.ONFIDO_TERMS_URL, | ||
privacy: process.env.ONFIDO_PRIVACY_URL | ||
} | ||
|
||
class PrivacyStatement extends Component { | ||
componentDidMount() { | ||
sendScreen(['privacy']) | ||
} | ||
|
||
render({i18n, back, acceptTerms}) { | ||
const title = i18n.t('privacy.title') | ||
return ( | ||
<div className={style.privacy}> | ||
<Title {...{title}} /> | ||
<div className={`${theme.thickWrapper} ${style.content}`}> | ||
<ul className={style.list}> | ||
<li className={style.item}>{i18n.t('privacy.item_1')}</li> | ||
<li className={style.item}>{i18n.t('privacy.item_2')}</li> | ||
<li className={style.item}>{i18n.t('privacy.item_3')}</li> | ||
</ul> | ||
|
||
<div> | ||
<div className={style.smallPrint}> | ||
{ parseI18nWithXmlTags(i18n, 'privacy.small_print', tagElement => ( | ||
<a href={externalUrls[tagElement.type]} target='_blank'>{tagElement.text}</a> | ||
))} | ||
</div> | ||
<div className={style.actions}> | ||
<button onClick={preventDefaultOnClick(back)} | ||
className={`${theme.btn} ${style.decline}`}> | ||
{i18n.t('privacy.decline')} | ||
</button> | ||
<button href='#' className={`${theme.btn} ${theme["btn-primary"]} ${style.primary}`} | ||
onClick={preventDefaultOnClick(acceptTerms)}> | ||
{i18n.t('privacy.continue')} | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
} | ||
} | ||
|
||
export default PrivacyStatement |
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,94 @@ | ||
@import (less) "../Theme/constants.css"; | ||
|
||
.privacy { | ||
/* | ||
The height is calculated by subtracting 112px (parent's margin top 48px + parent's margin bottom (64px)) from the height of its parent. | ||
This will allow consistent spacing between its children when using flexbox | ||
and for the actions to always sit above the "powered-by-onfido" logo. | ||
*/ | ||
height: calc(~"100% - 112px"); | ||
width: 100%; | ||
position: absolute; | ||
} | ||
|
||
.content { | ||
height: calc(~"100% - 112px"); | ||
display: flex; | ||
justify-content: space-around; | ||
flex-direction: column; | ||
color: #0F2536; | ||
} | ||
|
||
.actions { | ||
display: flex; | ||
justify-content: space-between; | ||
flex-direction: row; | ||
margin-bottom: 24px; | ||
@media (--small-viewport) { | ||
margin-bottom: 0; | ||
} | ||
} | ||
|
||
.list { | ||
font-size: 16px; | ||
line-height: 24px; | ||
text-align: left; | ||
padding-left: 64px; | ||
position: relative; | ||
margin-bottom: 0; | ||
@media (--small-viewport) { | ||
padding-left: 32px; | ||
} | ||
} | ||
|
||
.item { | ||
list-style: none; | ||
margin-bottom: 16px; | ||
} | ||
|
||
.item:before{ | ||
content: ''; | ||
display: inline-block; | ||
height: 16px; | ||
width: 32px; | ||
background-image: url('assets/tick-grey.svg'); | ||
background-repeat: no-repeat; | ||
position: relative; | ||
margin-left: -32px; | ||
@media (--small-viewport) { | ||
margin-left: -32px; | ||
} | ||
} | ||
|
||
.smallPrint { | ||
text-align: left; | ||
font-size: 11px; | ||
font-weight: 400; | ||
line-height: 18px; | ||
margin-bottom: 24px; | ||
} | ||
|
||
.smallPrint a { | ||
color: #0F2536; | ||
margin-top: 10px; | ||
margin-bottom: 10px; | ||
} | ||
|
||
.decline { | ||
width: 136px; | ||
border: 1px solid #8A9293; | ||
border-radius: 28px; | ||
background-color: transparent; | ||
color: #585E5F; | ||
line-height: 16px; | ||
@media (--small-viewport) { | ||
width: 112px; | ||
padding: 0px 16px; | ||
} | ||
} | ||
|
||
.primary { | ||
@media (--small-viewport) { | ||
width: 152px; | ||
} | ||
} |
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
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
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.