aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/@next/components/link.tsx
diff options
context:
space:
mode:
authorSteve Klebanoff <steve@0xproject.com>2018-12-18 07:24:30 +0800
committerGitHub <noreply@github.com>2018-12-18 07:24:30 +0800
commit8925317c95927111b48d29d15e44de19db432052 (patch)
tree530bb9824a29b346e645277d82d5edb294112068 /packages/website/ts/@next/components/link.tsx
parent4626921bb6deb3ec9a9768ba9afb01dd690292ec (diff)
parent6e0d622a1559937d8867216d571156564c666c77 (diff)
downloaddexon-0x-contracts-8925317c95927111b48d29d15e44de19db432052.tar.gz
dexon-0x-contracts-8925317c95927111b48d29d15e44de19db432052.tar.zst
dexon-0x-contracts-8925317c95927111b48d29d15e44de19db432052.zip
Merge pull request #1444 from 0xProject/feature/website/0x-org-instant-config
[website] 0x.org Instant
Diffstat (limited to 'packages/website/ts/@next/components/link.tsx')
-rw-r--r--packages/website/ts/@next/components/link.tsx21
1 files changed, 14 insertions, 7 deletions
diff --git a/packages/website/ts/@next/components/link.tsx b/packages/website/ts/@next/components/link.tsx
index c3633987a..0976a57a8 100644
--- a/packages/website/ts/@next/components/link.tsx
+++ b/packages/website/ts/@next/components/link.tsx
@@ -13,19 +13,23 @@ interface LinkInterface {
theme?: {
textColor: string;
};
+ target?: string;
}
export const Link = (props: LinkInterface) => {
- const {
- children,
- isNoArrow,
- href,
- } = props;
+ const { children, isNoArrow, href, target } = props;
return (
<StyledLink to={href} {...props}>
{children}
- {!isNoArrow && <svg width="25" height="25" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.484 5.246l.023 1.411 8.147.053L4.817 18.547l.996.996L17.65 7.706l.052 8.146 1.411.024-.068-10.561-10.561-.069z" fill="currentColor"/></svg>}
+ {!isNoArrow && (
+ <svg width="25" height="25" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <path
+ d="M8.484 5.246l.023 1.411 8.147.053L4.817 18.547l.996.996L17.65 7.706l.052 8.146 1.411.024-.068-10.561-10.561-.069z"
+ fill="currentColor"
+ />
+ </svg>
+ )}
</StyledLink>
);
};
@@ -39,7 +43,10 @@ export const LinkWrap = styled.div`
}
`;
-const StyledLink = styled(ReactRouterLink)<LinkInterface>`
+const StyledLink =
+ styled(ReactRouterLink) <
+ LinkInterface >
+ `
display: ${props => !props.isBlock && 'inline-flex'};
color: ${props => props.color || props.theme.linkColor};
text-align: center;