blob: a5a7e9dc43add485becec658e3c21a5cf3cd1a9f (
plain) (
tree)
|
|
import * as React from 'react';
import styled from 'styled-components';
import { media, colors } from '../variables';
import { Alpha, Lead } from './Typography';
import Container from './Container';
import Breakout from './Breakout';
const Main = styled.div`
background-color: ${colors.lightGray};
padding: 6.25rem;
display: flex;
justify-content: space-between;
${media.small`
padding: 2.5rem 1.875rem
display: block;
`};
`;
const Title = styled(Alpha)`
margin-bottom: 2.5rem;
${media.small`margin-bottom: 2.25rem;`};
`;
const Blocks = styled.div`
display: flex;
justify-content: space-between;
width: 100%;
${media.small`display: block;`};
`;
const StyledIntroLead = styled(Lead)`
max-width: 25.9375rem;
${media.small`margin-bottom: 1.5625rem;`};
`;
const StyledIntroAside = styled.div`
max-width: 32.5rem;
position: relative;
`;
interface IntroProps {
children?: React.ReactNode;
}
interface IntroLeadProps {
title: string;
children?: React.ReactNode;
}
function IntroLead(props: IntroLeadProps) {
return (
<StyledIntroLead>
<Title>{props.title}</Title>
{props.children}
</StyledIntroLead>
)
}
function IntroAside(props: IntroProps) {
return (
<Breakout>
<StyledIntroAside>
{props.children}
</StyledIntroAside>
</Breakout>
)
}
function Intro(props: IntroProps) {
return (
<Container wide>
<Main>
<Blocks>{props.children}</Blocks>
</Main>
</Container>
);
}
export default Intro;
export { IntroLead, IntroAside, Intro };
|