From f02f88422e4823b0354c8063aaaded30d6a405a7 Mon Sep 17 00:00:00 2001 From: danny Date: Thu, 26 Oct 2017 15:37:57 -0400 Subject: [PATCH] use NewTabLink in Web3.tsx, allow NewTabLink to accept className --- common/components/WalletDecrypt/Web3.tsx | 10 ++++------ common/components/ui/NewTabLink.tsx | 8 +++++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/common/components/WalletDecrypt/Web3.tsx b/common/components/WalletDecrypt/Web3.tsx index cadd7da8ddc..f2edeae6c94 100644 --- a/common/components/WalletDecrypt/Web3.tsx +++ b/common/components/WalletDecrypt/Web3.tsx @@ -1,5 +1,6 @@ import React, { Component } from 'react'; import translate from 'translations'; +import { NewTabLink } from 'components/ui'; import './Web3.scss'; interface Props { @@ -20,14 +21,11 @@ export default class Web3Decrypt extends Component {
- - {translate('Download MetaMask')} - + />
); diff --git a/common/components/ui/NewTabLink.tsx b/common/components/ui/NewTabLink.tsx index 520986fedb6..fa74a270e34 100644 --- a/common/components/ui/NewTabLink.tsx +++ b/common/components/ui/NewTabLink.tsx @@ -2,6 +2,7 @@ import React from 'react'; interface AAttributes { charset?: string; + className?: string; coords?: string; download?: string; href: string; @@ -28,14 +29,15 @@ interface AAttributes { type?: string; } -interface NewTabLinkProps extends AAttributes { +interface NewTabLinkProps extends AAttributes { content?: React.ReactElement | string; children?: React.ReactElement | string; } -const NewTabLink = ({ content, children, ...rest }: NewTabLinkProps) => +const NewTabLink = ({ content, children, ...rest }: NewTabLinkProps) => ( {content || children} {/* Keep content for short-hand text insertion */} - ; + +); export default NewTabLink;