aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/components/amount_placeholder.tsx
blob: 54639effb74cba0fd2584dc0ed38675527a9bf86 (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
import * as React from 'react';

import { ColorOption } from '../style/theme';

import { Pulse } from './animations/pulse';

import { Text } from './ui';

export interface AmountPlaceholderProps {
    pulsating: boolean;
}

const PlainPlaceholder = () => (
    <Text fontWeight="bold" fontColor={ColorOption.white}>
        &mdash;
    </Text>
);

export const AmountPlaceholder: React.StatelessComponent<AmountPlaceholderProps> = props => {
    if (props.pulsating) {
        return (
            <Pulse>
                <PlainPlaceholder />
            </Pulse>
        );
    } else {
        return <PlainPlaceholder />;
    }
};