aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/pages/jobs/bulleted_item_list.tsx
blob: a00290418ae3c3d1c639dcceafa6e373eb1b1461 (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
60
61
62
import { colors } from '@0xproject/react-shared';
import * as _ from 'lodash';
import * as React from 'react';

export type BulletedItemInfo = BulletedItemProps;
export interface BulletedItemListProps {
    headerText?: string;
    bulletedItemInfos: BulletedItemInfo[];
}
export const BulletedItemList = (props: BulletedItemListProps) => {
    return (
        <div className="mx-auto max-width-4">
            {!_.isUndefined(props.headerText) && (
                <div
                    className="h2 lg-py4 md-py4 sm-py3"
                    style={{
                        paddingLeft: 90,
                        fontFamily: 'Roboto Mono',
                        minHeight: '1.25em',
                        lineHeight: 1.25,
                    }}
                >
                    {props.headerText}
                </div>
            )}

            <div className="px2">
                {_.map(props.bulletedItemInfos, bulletedItemProps => {
                    return (
                        <BulletedItem
                            key={bulletedItemProps.title}
                            bulletColor={bulletedItemProps.bulletColor}
                            title={bulletedItemProps.title}
                            description={bulletedItemProps.description}
                        />
                    );
                })}
            </div>
        </div>
    );
};

interface BulletedItemProps {
    bulletColor: string;
    title: string;
    description: string;
    height?: number;
}
const BulletedItem = (props: BulletedItemProps) => {
    const minHeight = props.height || 150;
    return (
        <div className="flex" style={{ minHeight }}>
            <svg className="flex-none px2" height="26" width="26">
                <circle cx="13" cy="13" r="13" fill={props.bulletColor} />
            </svg>
            <div className="flex-auto px2">
                <div style={{ paddingTop: 3, fontWeight: 'bold', fontSize: 16 }}>{props.title}</div>
                <div style={{ paddingTop: 12, fontSize: 16, lineHeight: 2 }}>{props.description}</div>
            </div>
        </div>
    );
};