aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/ui/input_label.tsx
blob: 5866c70b66ee5caa620df0fd541e7195ed148360 (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
import * as React from 'react';
import {colors} from 'material-ui/styles';

export interface InputLabelProps {
    text: string | Element | React.ReactNode;
}

const styles = {
    label: {
        color: colors.grey500,
        fontSize: 12,
        pointerEvents: 'none',
        textAlign: 'left',
        transform: 'scale(0.75) translate(0px, -28px)',
        transformOrigin: 'left top 0px',
        transition: 'all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms',
        userSelect: 'none',
        width: 240,
        zIndex: 1,
    },
};

export const InputLabel = (props: InputLabelProps) => {
    return (
        <label style={styles.label}>{props.text}</label>
    );
};