Added new tab prop to announcement
This commit is contained in:
@@ -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>
|
||||||
|
@@ -10,6 +10,7 @@ import { WebsitePaths } from 'ts/types';
|
|||||||
const announcement = {
|
const announcement = {
|
||||||
headline: 'StarkDEX: Bringing STARKs to Ethereum',
|
headline: 'StarkDEX: Bringing STARKs to Ethereum',
|
||||||
href: 'https://www.starkdex.io',
|
href: 'https://www.starkdex.io',
|
||||||
|
shouldOpenInNewTab: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
export const SectionLandingHero = () => (
|
export const SectionLandingHero = () => (
|
||||||
|
Reference in New Issue
Block a user