introduces wrapwidth to section component

This commit is contained in:
Ezekiel Aquino
2018-12-12 16:13:09 +01:00
parent 6d2da94f8a
commit 7845fdbd9c
2 changed files with 3 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ import styled from 'styled-components';
interface WrapProps {
offsetTop?: string;
maxWidth?: string;
wrapWidth?: string;
isFullWidth?: boolean;
isTextCentered?: boolean;
isCentered?: boolean;
@@ -94,6 +95,7 @@ const SectionBase = styled.section<SectionProps>`
`;
const Wrap = styled(FlexWrap)<WrapProps>`
width: ${props => props.wrapWidth || 'calc(100% - 60px)'};
max-width: ${props => !props.isFullWidth && (props.maxWidth || '895px')};
text-align: ${props => props.isTextCentered && 'center'};
margin: 0 auto;

View File

@@ -17,6 +17,7 @@ export const SectionLandingCta = (props: Props) => (
isPadded={false}
isFlex={true}
maxWidth="auto"
wrapWidth="100%"
flexBreakpoint="900px"
>
<BlockIconLink