diff options
author | Fabio Berger <me@fabioberger.com> | 2018-06-06 17:30:57 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-06-06 17:30:57 +0800 |
commit | 787eec8be4d1318b87bb1edfa1ac9c8689297ccb (patch) | |
tree | c5f689ff8d277a8f88645624b4e1162e3cb45efc /packages/website/ts/components/ui/container.tsx | |
parent | 25f62daf146895a1e0e0c966166f08f28467ae2e (diff) | |
parent | cc39eea9991306eabadd912256452f67fb49c20b (diff) | |
download | dexon-0x-contracts-787eec8be4d1318b87bb1edfa1ac9c8689297ccb.tar.gz dexon-0x-contracts-787eec8be4d1318b87bb1edfa1ac9c8689297ccb.tar.zst dexon-0x-contracts-787eec8be4d1318b87bb1edfa1ac9c8689297ccb.zip |
Merge v2-prototype
Diffstat (limited to 'packages/website/ts/components/ui/container.tsx')
-rw-r--r-- | packages/website/ts/components/ui/container.tsx | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/packages/website/ts/components/ui/container.tsx b/packages/website/ts/components/ui/container.tsx index d577447b0..c6a78e181 100644 --- a/packages/website/ts/components/ui/container.tsx +++ b/packages/website/ts/components/ui/container.tsx @@ -11,13 +11,20 @@ export interface ContainerProps { paddingBottom?: StringOrNum; paddingRight?: StringOrNum; paddingLeft?: StringOrNum; + backgroundColor?: string; + borderRadius?: StringOrNum; maxWidth?: StringOrNum; - children?: React.ReactNode; + isHidden?: boolean; + className?: string; } -export const Container: React.StatelessComponent<ContainerProps> = (props: ContainerProps) => { - const { children, ...style } = props; - return <div style={style}>{children}</div>; +export const Container: React.StatelessComponent<ContainerProps> = ({ children, className, isHidden, ...style }) => { + const visibility = isHidden ? 'hidden' : undefined; + return ( + <div style={{ ...style, visibility }} className={className}> + {children} + </div> + ); }; Container.displayName = 'Container'; |