This repository has been archived by the owner on Jan 26, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
428 additions
and
0 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
47 changes: 47 additions & 0 deletions
47
brave/ui/app/components/app/connect-wallet/assets/styles.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,47 @@ | ||
module.exports = { | ||
container: { | ||
width: '100%', | ||
border: '1px solid rgb(218, 220, 232)', | ||
borderRadius: '12px', | ||
padding: '20px 35px', | ||
textAlign: 'left', | ||
marginTop: '20px' | ||
}, | ||
title: { | ||
display: 'block', | ||
fontSize: '18px', | ||
fontWeight: '500', | ||
color: 'rgb(59, 62, 79)' | ||
}, | ||
subText: { | ||
display: 'block', | ||
fontWeight: '14px', | ||
fontWeight: '300', | ||
marginTop: '5px', | ||
maxWidth: '515px' | ||
}, | ||
controls: { | ||
display: 'inline-block', | ||
float: 'right', | ||
marginTop: '23px' | ||
}, | ||
create: { | ||
width: '85px', | ||
height: '32px', | ||
border: '1px solid rgb(194, 196, 207)', | ||
borderRadius: '100px', | ||
marginRight: '20px', | ||
fontSize: '14px', | ||
fontWeight: 'bold', | ||
color: 'rgb(59, 62, 79)', | ||
cursor: 'pointer' | ||
}, | ||
restore: { | ||
cursor: 'pointer', | ||
fontSize: '14px', | ||
fontWeight: 'bold' | ||
}, | ||
hardwareImg: { | ||
width: '100px' | ||
} | ||
} |
78 changes: 78 additions & 0 deletions
78
brave/ui/app/components/app/connect-wallet/connect-wallet.component.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,78 @@ | ||
import React,{ PureComponent } from "react"; | ||
import styles from './assets/styles' | ||
|
||
module.exports = class ConnectWallet extends PureComponent { | ||
|
||
get text () { | ||
const { type } = this.props | ||
const hardwareString = (type) => `Connect your ${type} hardware wallet to interact with dApps and make transfers to other connected wallets.` | ||
|
||
switch (type) { | ||
case 'browser': | ||
return { | ||
title: 'New Browser Wallet', | ||
subText: 'Create a new Brave browser wallet to access dApps and store crypto and collectibles securely. Trade tokens annonymously with no trading fees.' | ||
} | ||
case 'ledger': | ||
return { | ||
title: (<div> | ||
<img style={styles.hardwareImg} src={'images/ledger-logo.svg'} /> | ||
</div>), | ||
subText: hardwareString('Ledger') | ||
} | ||
case 'trezor': | ||
return { | ||
title: (<div> | ||
<img style={styles.hardwareImg} src={'images/trezor-logo.svg'} /> | ||
</div>), | ||
subText: hardwareString('Trezor') | ||
} | ||
default: | ||
return { title: '', subText: '' } | ||
} | ||
} | ||
|
||
render () { | ||
const { type, onCreate, onRestore } = this.props | ||
const innerText = type === 'browser' ? 'Create' : 'Connect' | ||
const hwButtonStyle = type !== 'browser' ? { marginRight: '-15px' } : {} | ||
|
||
return ( | ||
<div style={styles.container}> | ||
<div style={styles.controls}> | ||
{ | ||
onCreate | ||
? <button | ||
style={ | ||
{ | ||
...styles.create, | ||
...hwButtonStyle | ||
} | ||
} | ||
onClick={onCreate} | ||
> | ||
{innerText} | ||
</button> | ||
: null | ||
} | ||
{ | ||
onRestore | ||
? <span | ||
style={styles.restore} | ||
onClick={onRestore} | ||
> | ||
{'Restore'} | ||
</span> | ||
: null | ||
} | ||
</div> | ||
<div style={styles.title}> | ||
<span>{this.text.title}</span> | ||
</div> | ||
<div style={styles.subText}> | ||
<span>{this.text.subText}</span> | ||
</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 @@ | ||
export { default } from './connect-wallet.component' |
Oops, something went wrong.