Add bgColor and removePadding props to container
This commit is contained in:
		@@ -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>
 | 
			
		||||
  );
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user