aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/ui/fake_text_field.tsx
blob: ac3c30fec46509d2e6ab86f7a54103477188855a (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
import { Styles } from '@0xproject/react-shared';
import * as React from 'react';
import { InputLabel } from 'ts/components/ui/input_label';

const styles: Styles = {
    hr: {
        borderBottom: '1px solid rgb(224, 224, 224)',
        borderLeft: 'none rgb(224, 224, 224)',
        borderRight: 'none rgb(224, 224, 224)',
        borderTop: 'none rgb(224, 224, 224)',
        bottom: 6,
        boxSizing: 'content-box',
        margin: 0,
        position: 'absolute',
        width: '100%',
    },
};

interface FakeTextFieldProps {
    label?: React.ReactNode | string;
    children?: any;
}

export const FakeTextField = (props: FakeTextFieldProps) => {
    return (
        <div className="relative">
            {props.label !== '' && <InputLabel text={props.label} />}
            <div className="pb2" style={{ height: 23 }}>
                {props.children}
            </div>
            <hr style={styles.hr} />
        </div>
    );
};