diff options
author | Fred Carlsen <fred@sjelfull.no> | 2018-11-29 00:08:59 +0800 |
---|---|---|
committer | Fred Carlsen <fred@sjelfull.no> | 2018-11-29 00:08:59 +0800 |
commit | 338207776849bb3846c84e8cdcae261abb0820b6 (patch) | |
tree | 645fcc4a0e98dc3b990797e52ae7428b80b9202e | |
parent | b9cbc878828d51a646fcd491d4ea86dd9899ca98 (diff) | |
download | dexon-sol-tools-338207776849bb3846c84e8cdcae261abb0820b6.tar dexon-sol-tools-338207776849bb3846c84e8cdcae261abb0820b6.tar.gz dexon-sol-tools-338207776849bb3846c84e8cdcae261abb0820b6.tar.bz2 dexon-sol-tools-338207776849bb3846c84e8cdcae261abb0820b6.tar.lz dexon-sol-tools-338207776849bb3846c84e8cdcae261abb0820b6.tar.xz dexon-sol-tools-338207776849bb3846c84e8cdcae261abb0820b6.tar.zst dexon-sol-tools-338207776849bb3846c84e8cdcae261abb0820b6.zip |
Add bgColor and removePadding props to container
-rw-r--r-- | packages/website/ts/@next/components/container.tsx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/packages/website/ts/@next/components/container.tsx b/packages/website/ts/@next/components/container.tsx index a4da10cfd..4eacb5e51 100644 --- a/packages/website/ts/@next/components/container.tsx +++ b/packages/website/ts/@next/components/container.tsx @@ -2,19 +2,24 @@ import * as React from 'react'; import styled from 'styled-components'; interface ContainerProps { + bgColor?: string; + removePadding?: boolean; } -const StyledContainer = styled.div` +const StyledContainer = styled.div<ContainerProps>` + background-color: ${props => props.bgColor || 'transparent'}; max-width: 117rem; // 2000px margin: 0 auto; padding: 0 1.764705882rem; // 30px + + ${props => props.removePadding && `padding: 0;`} `; export const Container: React.StatelessComponent<ContainerProps> = props => { const { children } = props; return ( - <StyledContainer> + <StyledContainer {...props}> {children} </StyledContainer> ); |