-
Notifications
You must be signed in to change notification settings - Fork 251
/
Header.js
34 lines (34 loc) 路 804 Bytes
/
Header.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
import React from 'react';
import styled from 'styled-components';
import { useMobile } from '../hooks';
import Logo from '../assets/img/logo.png';
const Wrapper = styled.header`
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.logo {
width: 2.8rem;
height: 2.8rem;
margin-bottom: 1rem;
background-color: rgba(0, 0, 0, 0.2);
padding: 0.5rem;
border-radius: 50%;
}
> h1 {
writing-mode: vertical-lr;
text-transform: uppercase;
font-size: 2rem;
font-weight: 800;
letter-spacing: 0.1rem;
}
`;
export default function Header() {
const { isMobile } = useMobile();
return isMobile ? null : (
<Wrapper>
<img className="logo" src={Logo} alt="logo" />
<h1>chinese color</h1>
</Wrapper>
);
}