diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-06-29 15:59:24 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-06-29 15:59:24 +0800 |
commit | aedd51a61bcc9ecef660c1bea1641c0400f3ac45 (patch) | |
tree | 20177ccc8b1d933d543ea2cc5ce51e291f492d40 /packages/website/ts/components/wallet/null_token_row.tsx | |
parent | 0b5a49c17dde87130a659e4101bd6e2f5666b9c7 (diff) | |
download | dexon-0x-contracts-aedd51a61bcc9ecef660c1bea1641c0400f3ac45.tar.gz dexon-0x-contracts-aedd51a61bcc9ecef660c1bea1641c0400f3ac45.tar.zst dexon-0x-contracts-aedd51a61bcc9ecef660c1bea1641c0400f3ac45.zip |
Refactor inline styles out of Wallet
Diffstat (limited to 'packages/website/ts/components/wallet/null_token_row.tsx')
-rw-r--r-- | packages/website/ts/components/wallet/null_token_row.tsx | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/packages/website/ts/components/wallet/null_token_row.tsx b/packages/website/ts/components/wallet/null_token_row.tsx new file mode 100644 index 000000000..c8b4e67d0 --- /dev/null +++ b/packages/website/ts/components/wallet/null_token_row.tsx @@ -0,0 +1,41 @@ +import * as React from 'react'; + +import { Circle } from 'ts/components/ui/circle'; +import { Container } from 'ts/components/ui/container'; +import { Text } from 'ts/components/ui/text'; +import { PlaceHolder } from 'ts/components/wallet/placeholder'; +import { StandardIconRow } from 'ts/components/wallet/standard_icon_row'; +import { colors } from 'ts/style/colors'; + +export interface NullTokenRowProps { + iconDimension: number; + fillColor: string; +} + +export const NullTokenRow: React.StatelessComponent<NullTokenRowProps> = ({ iconDimension, fillColor }) => { + const icon = <Circle diameter={iconDimension} fillColor={fillColor} />; + const main = ( + <div className="flex flex-column"> + <PlaceHolder hideChildren={true} fillColor={fillColor}> + <Text fontSize="16px" fontWeight="bold" lineHeight="1em"> + 0.00 XXX + </Text> + </PlaceHolder> + <Container marginTop="3px"> + <PlaceHolder hideChildren={true} fillColor={fillColor}> + <Text fontSize="14px" fontColor={colors.darkGrey} lineHeight="1em"> + 0.00 + </Text> + </PlaceHolder> + </Container> + </div> + ); + const accessory = ( + <Container marginRight="12px"> + <PlaceHolder hideChildren={true} fillColor={fillColor}> + <Container width="20px" height="14px" /> + </PlaceHolder> + </Container> + ); + return <StandardIconRow icon={icon} main={main} accessory={accessory} />; +}; |