From b680b9e02e2369b1ccde6e86a18afd7f61610c50 Mon Sep 17 00:00:00 2001 From: Timothy <1695613+timothyis@users.noreply.github.com> Date: Fri, 20 Apr 2018 16:03:34 +0100 Subject: [PATCH] Improve update notification contrast (#2791) --- lib/components/notification.js | 13 +++++++------ lib/components/notifications.js | 7 ++++--- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/lib/components/notification.js b/lib/components/notification.js index eaa05fc2..0d5b6ffb 100644 --- a/lib/components/notification.js +++ b/lib/components/notification.js @@ -63,10 +63,10 @@ export default class Notification extends React.PureComponent { } render() { - const {backgroundColor} = this.props; + const {backgroundColor, color} = this.props; const opacity = this.state.dismissing ? 0 : 1; return ( -
+
{this.props.customChildrenBefore} {this.props.children || this.props.text} {this.props.userDismissable ? ( @@ -86,12 +86,11 @@ export default class Notification extends React.PureComponent { cursor: default; -webkit-user-select: none; background: rgba(255, 255, 255, 0.2); - border-radius: 2px; padding: 8px 14px 9px; margin-left: 10px; transition: 150ms opacity ease; color: #fff; - font-size: 11px; + font-size: 12px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; } @@ -100,12 +99,14 @@ export default class Notification extends React.PureComponent { position: relative; left: 4px; cursor: pointer; - color: #528d11; + opacity: 0.5; + color: currentColor; + transition: opacity 0.1s ease-in-out; } .notification_dismissLink:hover, .notification_dismissLink:focus { - color: #2a5100; + opacity: 1; } `}
diff --git a/lib/components/notifications.js b/lib/components/notifications.js index fdea5d97..80ddf735 100644 --- a/lib/components/notifications.js +++ b/lib/components/notifications.js @@ -66,14 +66,15 @@ export default class Notifications extends React.PureComponent { {this.props.updateShowing && ( Version {this.props.updateVersion} ready. {this.props.updateNote && ` ${this.props.updateNote.trim().replace(/\.$/, '')}`} ( { window.require('electron').shell.openExternal(ev.target.href); ev.preventDefault(); @@ -96,7 +97,7 @@ export default class Notifications extends React.PureComponent { ) : (