polished website
This commit is contained in:
@@ -16,14 +16,16 @@ interface Props {
|
||||
actions?: React.ReactNode;
|
||||
background?: React.ReactNode;
|
||||
announcement?: AnnouncementProps;
|
||||
sectionPadding?: string;
|
||||
}
|
||||
|
||||
interface SectionProps {
|
||||
isAnnouncement?: boolean;
|
||||
padding?: string;
|
||||
}
|
||||
|
||||
const Section = styled.section<SectionProps>`
|
||||
padding: ${props => (props.isAnnouncement ? '50px 0 120px 0' : '120px 0')};
|
||||
padding: ${props => props.padding || (props.isAnnouncement ? '50px 0 120px 0' : '120px 0')};
|
||||
position: relative;
|
||||
@media (max-width: 768px) {
|
||||
padding: 60px 0;
|
||||
@@ -129,14 +131,14 @@ const ButtonWrap = styled.div`
|
||||
|
||||
const BackgroundWrap = styled.div`
|
||||
position: absolute;
|
||||
bottom:0;
|
||||
left:0;
|
||||
right:0;
|
||||
top:0;
|
||||
`
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
`;
|
||||
|
||||
export const Hero: React.StatelessComponent<Props> = (props: Props) => (
|
||||
<Section isAnnouncement={!!props.announcement}>
|
||||
<Section padding={props.sectionPadding} isAnnouncement={!!props.announcement}>
|
||||
{!!props.background && <BackgroundWrap>{props.background}</BackgroundWrap>}
|
||||
<Wrap isCentered={!props.figure} isFullWidth={props.isFullWidth} isCenteredMobile={props.isCenteredMobile}>
|
||||
{props.figure && <Content width="400px">{props.figure}</Content>}
|
||||
|
||||
Reference in New Issue
Block a user