diff options
author | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-10-19 04:31:11 +0800 |
---|---|---|
committer | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-10-19 04:31:11 +0800 |
commit | 12b6877aeb0a6bcddab4193b62cd10347b8c328b (patch) | |
tree | 84066b8c74bf790a5d073de86014e727b7275db9 /packages/instant/src/components/amount_placeholder.tsx | |
parent | 4b348e1e603ec45e1e4bf39533b4b204423cafa0 (diff) | |
download | dexon-0x-contracts-12b6877aeb0a6bcddab4193b62cd10347b8c328b.tar.gz dexon-0x-contracts-12b6877aeb0a6bcddab4193b62cd10347b8c328b.tar.zst dexon-0x-contracts-12b6877aeb0a6bcddab4193b62cd10347b8c328b.zip |
Pulsating holder element showing, even if amount is empty
Diffstat (limited to 'packages/instant/src/components/amount_placeholder.tsx')
-rw-r--r-- | packages/instant/src/components/amount_placeholder.tsx | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/packages/instant/src/components/amount_placeholder.tsx b/packages/instant/src/components/amount_placeholder.tsx new file mode 100644 index 000000000..54639effb --- /dev/null +++ b/packages/instant/src/components/amount_placeholder.tsx @@ -0,0 +1,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}> + — + </Text> +); + +export const AmountPlaceholder: React.StatelessComponent<AmountPlaceholderProps> = props => { + if (props.pulsating) { + return ( + <Pulse> + <PlainPlaceholder /> + </Pulse> + ); + } else { + return <PlainPlaceholder />; + } +}; |