mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-15 21:08:57 +00:00
Link can now has children
This commit is contained in:
parent
86bf1b6446
commit
9f5bb3c1a6
@ -47,7 +47,7 @@ const A = styled.a`
|
||||
`;
|
||||
|
||||
const Link = ({
|
||||
text, href, target, rel, isGreen = false, isGray = false,
|
||||
children, href, target, rel, isGreen = false, isGray = false,
|
||||
}) => (
|
||||
<A
|
||||
href={href}
|
||||
@ -55,12 +55,15 @@ const Link = ({
|
||||
rel={rel}
|
||||
isGreen={isGreen}
|
||||
isGray={isGray}
|
||||
>{text}
|
||||
>{children}
|
||||
</A>
|
||||
);
|
||||
|
||||
Link.propTypes = {
|
||||
text: PropTypes.string.isRequired,
|
||||
children: PropTypes.oneOfType([
|
||||
PropTypes.string,
|
||||
PropTypes.array,
|
||||
]).isRequired,
|
||||
href: PropTypes.string.isRequired,
|
||||
target: PropTypes.string,
|
||||
rel: PropTypes.string,
|
||||
|
@ -1,6 +1,7 @@
|
||||
import React from 'react';
|
||||
import styled, { css } from 'styled-components';
|
||||
import Link from 'components/Link';
|
||||
import Button from 'components/Button';
|
||||
import P from 'components/Paragraph';
|
||||
import { H2 } from 'components/Heading';
|
||||
|
||||
@ -39,23 +40,28 @@ const BrowserNotSupported = () => (
|
||||
<BrowserLogo isChrome />
|
||||
<P isSmaller>Google Chrome</P>
|
||||
<Link
|
||||
text="Get Chrome"
|
||||
href="https://www.google.com/chrome/"
|
||||
target="_blank"
|
||||
rel="noreferrer noopener"
|
||||
isButton
|
||||
/>
|
||||
>
|
||||
<Button
|
||||
text="Get Chrome"
|
||||
/>
|
||||
</Link>
|
||||
</Browser>
|
||||
<Browser>
|
||||
<BrowserLogo isFirefox />
|
||||
<P isSmaller>Mozzila Firefox</P>
|
||||
<Link
|
||||
text="Get Firefox"
|
||||
href="https://www.mozilla.org/en-US/firefox/new/"
|
||||
target="_blank"
|
||||
rel="noreferrer noopener"
|
||||
isButton
|
||||
/>
|
||||
>
|
||||
<Button
|
||||
text="Get Firefox"
|
||||
/>
|
||||
</Link>
|
||||
|
||||
</Browser>
|
||||
</ChooseBrowserWrapper>
|
||||
</Wrapper>
|
||||
|
Loading…
Reference in New Issue
Block a user