aboutsummaryrefslogtreecommitdiffstats
path: root/packages/dev-tools-pages/ts/components/Intro.tsx
blob: c16c888b7d8d42713e7466027e9f2b74cbeeb733 (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
import * as React from 'react';
import styled from 'styled-components';

import { Alpha, Beta } from './Typography';

const Main = styled.div`
    background-color: #f1f4f5;
    padding: 6.25rem;
    display: flex;
    justify-content: space-between;
`;

const Title = styled(Alpha)`
    margin-bottom: 2.5rem;
`;

const Content = styled.div`
    max-width: 25.9375rem;

    display: flex;
    flex-direction: column;
`;

const Code = styled.div`
    background-color: #e9eced;
    width: 520px;
    height: 350px;
`;

interface IntroProps {
    title: string;
    children: React.ReactNode;
}

function Intro(props: IntroProps) {
    return (
        <Main>
            <Content>
                <Title>{props.title}</Title>
                <Beta as="div">{props.children}</Beta>
            </Content>
            <Code />
        </Main>
    );
}

export default Intro;