Roadmap to becoming a developer in 2022
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

28 lines
747 B

import { HeaderWrap, HeaderButtons, HeaderButton, Subtitle, Title } from './style';
const PageHeader = ({
title,
subtitle,
children,
primaryButtonText,
primaryButtonUrl,
secondaryButtonText,
secondaryButtonUrl,
}) => (
<HeaderWrap>
<Title>{ title }</Title>
<Subtitle dangerouslySetInnerHTML={{ __html: subtitle }} />
{
(primaryButtonText || secondaryButtonText) &&
<HeaderButtons>
{ primaryButtonText && <HeaderButton primary href={primaryButtonUrl}>{ primaryButtonText }</HeaderButton> }
{ secondaryButtonText && <HeaderButton href={secondaryButtonUrl}>{ secondaryButtonText }</HeaderButton> }
</HeaderButtons>
}
{ children }
</HeaderWrap>
);
export default PageHeader;