added announcement component

This commit is contained in:
David Sun
2019-02-15 13:24:28 -05:00
parent 82ed9ef25e
commit 13df5adecd
3 changed files with 41 additions and 1 deletions

View File

@@ -1,8 +1,9 @@
import * as React from 'react';
import styled from 'styled-components';
import { addFadeInAnimation } from 'ts/constants/animations';
import { Announcement, AnnouncementProps } from './announcement';
interface Props {
title: string;
maxWidth?: string;
@@ -13,6 +14,7 @@ interface Props {
description: string;
figure?: React.ReactNode;
actions?: React.ReactNode;
announcement?: AnnouncementProps;
}
const Section = styled.section`
@@ -126,6 +128,7 @@ export const Hero: React.StatelessComponent<Props> = (props: Props) => (
{props.figure && <Content width="400px">{props.figure}</Content>}
<Content width={props.maxWidth ? props.maxWidth : props.figure ? '546px' : '678px'}>
{!!props.announcement && <Announcement {...props.announcement} />}
<Title isLarge={props.isLargeTitle} maxWidth={props.maxWidthHeading}>
{props.title}
</Title>