Skip to content

Commit

Permalink
Code cleanup for connected-indicator-info-popup
Browse files Browse the repository at this point in the history
  • Loading branch information
danjm committed Apr 22, 2020
1 parent 64c43de commit e3735f8
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 23 deletions.
2 changes: 1 addition & 1 deletion app/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -1636,7 +1636,7 @@
"welcome": {
"message": "Welcome to MetaMask"
},
"whatsthis": {
"whatsThis": {
"message": "What's this?"
},
"writePhrase": {
Expand Down
3 changes: 0 additions & 3 deletions ui/app/components/ui/popover/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@
background: white;
position: absolute;
transform: rotate(45deg);
top: -6px;
left: 24px;
display: flex;
box-shadow: 0px 4px 30px rgba(0, 0, 0, 0.25);
}
}
4 changes: 3 additions & 1 deletion ui/app/components/ui/popover/popover.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ Popover.propTypes = {
footerClassName: PropTypes.string,
onBack: PropTypes.func,
onClose: PropTypes.func.isRequired,
CustomBackground: PropTypes.node,
CustomBackground: PropTypes.func,
className: PropTypes.string,
showArrow: PropTypes.bool,
}

export default class PopoverPortal extends PureComponent {
Expand Down
7 changes: 1 addition & 6 deletions ui/app/pages/home/home.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ export default class Home extends PureComponent {
connectedStatusPopoverHasBeenShown: PropTypes.bool,
}

state = {
hidePopover: false,
}

UNSAFE_componentWillMount () {
const {
history,
Expand Down Expand Up @@ -185,7 +181,7 @@ export default class Home extends PureComponent {
const { t } = this.context
return (
<Popover
title={ t('whatsthis') }
title={ t('whatsThis') }
onClose={setConnectedStatusPopoverHasBeenShown}
className="home__connected-status-popover"
showArrow
Expand All @@ -207,7 +203,6 @@ export default class Home extends PureComponent {
{ t('dismiss') }
</Button>
)}
footerClassName="home__connected-status-popover-footer"
>
<main className="home__connect-status-text">
<div>{ t('metaMaskConnectStatusParagraphOne') }</div>
Expand Down
32 changes: 20 additions & 12 deletions ui/app/pages/home/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,26 @@
.popover-content {
overflow-y: auto;
}

.popover-arrow {
top: -6px;
left: 24px;
}

.popover-footer {
justify-content: flex-end;

& :only-child {
margin: 0;
}

button {
height: 39px;
width: 133px;
border-radius: 39px;
padding: 0;
}
}
}

&__connected-status-popover-bg {
Expand All @@ -81,16 +101,4 @@
height: 100%;
width: 100%;
}

&__connect-status-popover-footer {
margin: 0;
justify-content: flex-end;

button {
height: 39px;
width: 133px;
border-radius: 39px;
padding: 0;
}
}
}

0 comments on commit e3735f8

Please sign in to comment.