Merge pull request #6968 from MetaMask/prevent-hidden-popup-overlay

Prevent hidden popup overlay
feature/default_network_editable
Thomas Huang 5 years ago committed by GitHub
commit f679b58fcd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      ui/app/components/app/multiple-notifications/index.scss
  2. 32
      ui/app/components/app/multiple-notifications/multiple-notifications.component.js

@ -3,7 +3,6 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: 472px; width: 472px;
height: 116px;
position: absolute; position: absolute;
bottom: 0; bottom: 0;
right: 0; right: 0;
@ -37,7 +36,6 @@
} }
.home-notification-wrapper--show-all { .home-notification-wrapper--show-all {
height: 356px;;
justify-content: flex-end; justify-content: flex-end;
margin-bottom: 0; margin-bottom: 0;

@ -18,21 +18,27 @@ export default class MultipleNotifications extends PureComponent {
const notificationsToBeRendered = notifications.filter(notificationConfig => notificationConfig.shouldBeRendered) const notificationsToBeRendered = notifications.filter(notificationConfig => notificationConfig.shouldBeRendered)
return (<div if (notificationsToBeRendered.length === 0) {
className={classnames(...classNames, { return null
'home-notification-wrapper--show-all': showAll, }
'home-notification-wrapper--show-first': !showAll,
})} return (
>
{ notificationsToBeRendered.map(notificationConfig => notificationConfig.component) }
<div <div
className="home-notification-wrapper__i-container" className={classnames(...classNames, {
onClick={() => this.setState({ showAll: !showAll })} 'home-notification-wrapper--show-all': showAll,
'home-notification-wrapper--show-first': !showAll,
})}
> >
{notificationsToBeRendered.length > 1 ? <i className={classnames('fa fa-sm fa-sort-amount-asc', { { notificationsToBeRendered.map(notificationConfig => notificationConfig.component) }
'flipped': !showAll, <div
})} /> : null} className="home-notification-wrapper__i-container"
onClick={() => this.setState({ showAll: !showAll })}
>
{notificationsToBeRendered.length > 1 ? <i className={classnames('fa fa-sm fa-sort-amount-asc', {
'flipped': !showAll,
})} /> : null}
</div>
</div> </div>
</div>) )
} }
} }

Loading…
Cancel
Save