aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/@next
diff options
context:
space:
mode:
authorFred Carlsen <fred@sjelfull.no>2018-11-29 00:08:59 +0800
committerFred Carlsen <fred@sjelfull.no>2018-11-29 00:08:59 +0800
commit338207776849bb3846c84e8cdcae261abb0820b6 (patch)
tree645fcc4a0e98dc3b990797e52ae7428b80b9202e /packages/website/ts/@next
parentb9cbc878828d51a646fcd491d4ea86dd9899ca98 (diff)
downloaddexon-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
Diffstat (limited to 'packages/website/ts/@next')
-rw-r--r--packages/website/ts/@next/components/container.tsx9
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>
);