Add badges on roadmaps

This commit is contained in:
Kamran Ahmed
2019-11-09 15:40:32 +04:00
parent e0702bbb59
commit ea9c0cf703
6 changed files with 67 additions and 32 deletions

View File

@@ -1,26 +1,14 @@
import { HeaderWrap, HeaderButtons, HeaderButton, Subtitle, Title } from './style';
import { HeaderWrap, 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>
);

View File

@@ -20,19 +20,3 @@ export const Subtitle = styled.p`
font-weight: 700;
}
`;
export const HeaderButton = styled.a`
box-shadow: rgba(0, 0, 0, 0.12) 0 5px 10px 0;
padding: 9px 25px;
background: ${ props => props.primary ? '#101010' : '#ffffff' } !important;
color: ${ props => props.primary ? '#ffffff' : '#101010' } !important;
border-radius: 4px;
margin-left: ${ props => !props.primary ? '15px': 0 };
cursor: pointer;
font-size: 15px;
display: inline-block;
`;
export const HeaderButtons = styled.div`
margin: 30px 0 0;
`;