-
Notifications
You must be signed in to change notification settings - Fork 96
/
Copy pathnotification.js
48 lines (47 loc) · 1.17 KB
/
notification.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import { ellipsis } from 'polished';
import Container from './container';
import withPure from './hoc/pure';
export default withPure(({ href, title, titleMobile, children }) => (
<div className="notification f6" title={title}>
<style jsx>
{`
.notification {
width: 100%;
height: 50px;
text-align: center;
background: #fafafa;
border-bottom: 1px solid #eaeaea;
display: flex;
align-items: center;
justify-content: space-around;
}
a {
color: #6a6a6a;
font-size: 0.875rem;
}
:global(.highlight) {
margin: 0 1rem;
color: #0070f3;
transition: opacity 200ms ease;
}
a:hover :global(.highlight) {
opacity: 0.8;
}
`}
</style>
<Container style={ellipsis()}>
{titleMobile ? (
<>
<a href={href} className="display-mobile">
{titleMobile}
</a>
<a href={href} className="hide-mobile">
{children}
</a>
</>
) : (
<a href={href}>{children}</a>
)}
</Container>
</div>
));