Merge pull request #1846 from 0xProject/feature/website/starkdex-announcement

Added StarkDEX announcement to homepage
This commit is contained in:
David Sun 2019-06-03 12:17:02 -07:00 committed by GitHub
commit 3019e3817f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 5 deletions

View File

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

View File

@ -7,10 +7,11 @@ import { LandingAnimation } from 'ts/components/heroImage';
import { HeroAnimation } from 'ts/components/heroAnimation'; import { HeroAnimation } from 'ts/components/heroAnimation';
import { WebsitePaths } from 'ts/types'; import { WebsitePaths } from 'ts/types';
// const announcement = { const announcement = {
// headline: 'Vote on ZEIP-23 MultiAssetProxy', headline: 'StarkDEX: Bringing STARKs to Ethereum',
// href: '/vote', href: 'https://www.starkdex.io',
// }; shouldOpenInNewTab: true,
};
export const SectionLandingHero = () => ( export const SectionLandingHero = () => (
<Hero <Hero
@ -20,6 +21,7 @@ export const SectionLandingHero = () => (
description="0x is an open protocol that enables the peer-to-peer exchange of assets on the Ethereum blockchain." description="0x is an open protocol that enables the peer-to-peer exchange of assets on the Ethereum blockchain."
figure={<LandingAnimation image={<HeroAnimation />} />} figure={<LandingAnimation image={<HeroAnimation />} />}
actions={<HeroActions />} actions={<HeroActions />}
announcement={announcement}
/> />
); );