aboutsummaryrefslogtreecommitdiffstats
path: root/packages/dev-tools-pages/ts/components/Header.tsx
blob: 46dce01ebb5c8d157b4ce03d6f20473d1ca99c0e (plain) (blame)
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
49
50
51
52
53
54
55
56
57
58
59
import * as React from 'react';
import styled from 'styled-components';

import { withContext, Props } from './withContext';
import Container from './Container';
import { Small } from './Typography';

function Header(props: Props) {
    const { icon, title, colors } = props;

    return (
        <Container>
            <StyledHeader>
                <LogoMark>
                    <Logo as={icon} color={colors.main} />
                    <Title>{title}</Title>
                </LogoMark>

                <Link as="a" href="#">
                    Built by 0x
                </Link>
            </StyledHeader>
        </Container>
    );
}

const StyledHeader = styled.header`
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 3.75rem;
    padding-bottom: 0.875rem;
`;

const LogoMark = styled.div`
    display: flex;
    align-items: center;
`;

const StyledLogo = styled.div`
    color: ${props => props.color}
    width: 1.75rem;
    height: 1.75rem;
`;

const Title = styled.h1`
    font-size: 1.5rem;
    margin: 0;
    margin-left: 0.8125rem;
`;

const StyledLink = styled(Small)`
    color: inherit;
`;

const Link = StyledLink as any;
const Logo = StyledLogo as any;

export default withContext(Header);