Added new tab prop to announcement

This commit is contained in:
Chris Kalani 2019-06-03 11:55:19 -07:00
parent e737395c2b
commit da9e90faf0
2 changed files with 8 additions and 1 deletions

View File

@ -8,6 +8,7 @@ import { Button } from './button';
export interface AnnouncementProps {
headline: string;
href: string;
shouldOpenInNewTab?: boolean;
}
const BrandColorSpan = styled.span`
@ -31,7 +32,12 @@ const AnnouncementLink = styled(Button)`
export const Announcement: React.StatelessComponent<AnnouncementProps> = (props: AnnouncementProps) => {
return (
<Wrap>
<AnnouncementLink isWithArrow={true} isAccentColor={true} href={props.href}>
<AnnouncementLink
isWithArrow={true}
isAccentColor={true}
href={props.href}
target={props.shouldOpenInNewTab ? '_blank' : ''}
>
<BrandColorSpan>{'New!'}</BrandColorSpan>
{props.headline}
</AnnouncementLink>

View File

@ -10,6 +10,7 @@ import { WebsitePaths } from 'ts/types';
const announcement = {
headline: 'StarkDEX: Bringing STARKs to Ethereum',
href: 'https://www.starkdex.io',
shouldOpenInNewTab: true,
};
export const SectionLandingHero = () => (