Skip to content

Commit aceaf6e

Browse files
committed
refactor(notification): simplify notification message and bump the version
1 parent 0d6cb2e commit aceaf6e

File tree

2 files changed

+15
-20
lines changed

2 files changed

+15
-20
lines changed

src/components/NotificationBar/NotificationBar.jsx

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react';
22
import Container from '../Container/Container';
33
import testLocalStorage from '../../utilities/test-local-storage';
44

5-
const version = '1';
5+
const version = '2';
66
const localStorageIsEnabled = testLocalStorage() !== false;
77

88
export default class NotificationBar extends React.Component {
@@ -13,17 +13,16 @@ export default class NotificationBar extends React.Component {
1313
<div className={ `notification-bar ${dismissedMod}` }>
1414
<Container className="notification-bar__inner">
1515
<p>
16-
Sponsor webpack and get apparel at the same time! Visit <a href="https://webpack.threadless.com">the official webpack shop!</a>&nbsp; All proceeds go to webpack's <a href="https://opencollective.com/webpack">Open Collective page!</a>
17-
</p>
18-
<p>
19-
Buy the brand-new webpack stickers at <a href="http://www.unixstickers.com/tag/webpack">Unixstickers!</a>
20-
{localStorageIsEnabled ?
21-
<button
22-
className="notification-bar__close icon-cross"
23-
onClick={ this._close.bind(this) } /> :
24-
null
25-
}
16+
Sponsor webpack and get apparel from the <a href="https://webpack.threadless.com">official shop</a>&nbsp;
17+
or get stickers <a href="http://www.unixstickers.com/tag/webpack">here</a>! All proceeds go to our&nbsp;
18+
<a href="https://opencollective.com/webpack">open collective</a>!
2619
</p>
20+
{ localStorageIsEnabled ?
21+
<button
22+
className="notification-bar__close icon-cross"
23+
onClick={ this._close.bind(this) } /> :
24+
null
25+
}
2726
</Container>
2827
</div>
2928
);

src/components/NotificationBar/NotificationBar.scss

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
color: getColor(white);
66
background: getColor(emperor);
77

8-
p:not(:last-child) {
9-
padding-bottom: 1em;
10-
}
11-
128
a {
139
color: getColor(malibu);
1410

@@ -32,15 +28,15 @@
3228
}
3329

3430
.notification-bar__close {
35-
color: getColor(white);
36-
font-size: 16px;
37-
padding: 0;
38-
background: none;
39-
border: none;
4031
position: absolute;
32+
font-size: 16px;
4133
top: 10px;
4234
right: 1em;
35+
padding: 0;
36+
border: none;
4337
cursor: pointer;
38+
color: getColor(white);
39+
background: none;
4440
transition: color 250ms;
4541

4642
&:hover {

0 commit comments

Comments
 (0)