Skip to content

Commit

Permalink
Add border around account icon in top right
Browse files Browse the repository at this point in the history
  • Loading branch information
danjm committed Jul 8, 2019
1 parent b780e97 commit c05090a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
1 change: 1 addition & 0 deletions ui/app/components/app/app-header/app-header.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export default class AppHeader extends PureComponent {
<Identicon
address={selectedAddress}
diameter={32}
addBorder={true}
/>
</div>
)
Expand Down
11 changes: 7 additions & 4 deletions ui/app/components/ui/identicon/identicon.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const getStyles = diameter => (

export default class Identicon extends PureComponent {
static propTypes = {
addBorder: PropTypes.bool,
address: PropTypes.string,
className: PropTypes.string,
diameter: PropTypes.number,
Expand Down Expand Up @@ -70,7 +71,7 @@ export default class Identicon extends PureComponent {
}

render () {
const { className, address, image, diameter, useBlockie } = this.props
const { className, address, image, diameter, useBlockie, addBorder } = this.props

if (image) {
return this.renderImage()
Expand All @@ -83,9 +84,11 @@ export default class Identicon extends PureComponent {
return this.renderJazzicon()
}

return useBlockie
? this.renderBlockie()
: this.renderJazzicon()
return (
<div className={classnames({ 'identicon__address-wrapper': addBorder })}>
{ useBlockie ? this.renderBlockie() : this.renderJazzicon() }
</div>
)
}

return (
Expand Down
13 changes: 13 additions & 0 deletions ui/app/components/ui/identicon/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,17 @@
align-items: center;
justify-content: center;
overflow: hidden;

&__address-wrapper {
height: 40px;
width: 40px;
border-radius: 18px;
display: flex;
justify-content: center;
align-items: center;
border-style: solid;
border-radius: 50%;
border-width: 2px;
border-color: $curious-blue;
}
}

0 comments on commit c05090a

Please sign in to comment.