From 9669a4d1216b7d22107580daf3e2bff464eb2ade Mon Sep 17 00:00:00 2001 From: fragosti Date: Fri, 6 Jul 2018 14:09:36 -0700 Subject: Create Balance component and make token symbols smaller than token amounts --- packages/website/ts/components/ui/container.tsx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'packages/website/ts/components/ui/container.tsx') diff --git a/packages/website/ts/components/ui/container.tsx b/packages/website/ts/components/ui/container.tsx index edbf8814b..427cc6cc7 100644 --- a/packages/website/ts/components/ui/container.tsx +++ b/packages/website/ts/components/ui/container.tsx @@ -2,6 +2,8 @@ import * as React from 'react'; type StringOrNum = string | number; +export type ContainerTag = 'div' | 'span'; + export interface ContainerProps { marginTop?: StringOrNum; marginBottom?: StringOrNum; @@ -28,15 +30,21 @@ export interface ContainerProps { right?: string; bottom?: string; zIndex?: number; + Tag?: ContainerTag; } -export const Container: React.StatelessComponent = ({ children, className, isHidden, ...style }) => { +export const Container: React.StatelessComponent = props => { + const { children, className, Tag, isHidden, ...style } = props; const visibility = isHidden ? 'hidden' : undefined; return ( -
+ {children} -
+ ); }; +Container.defaultProps = { + Tag: 'div', +}; + Container.displayName = 'Container'; -- cgit