import * as React from 'react';
import { Link as ReactRouterLink } from 'react-router-dom';
import styled from 'styled-components';
import { colors } from 'ts/style/colors';
interface LinkInterface {
color?: string;
children?: Node | string;
isNoArrow?: boolean;
hasIcon?: boolean | string;
isBlock?: boolean;
isCentered?: boolean;
href?: string;
theme?: {
textColor: string;
};
}
export const Link = (props: LinkInterface) => {
const {
children,
isNoArrow,
href,
} = props;
return (
{children}
{!isNoArrow && }
);
};
// Added this, & + & doesnt really work since we switch with element types...
export const LinkWrap = styled.div`
a + a,
a + button,
button + a {
margin-left: 20px;
}
`;
const StyledLink = styled(ReactRouterLink)`
display: ${props => !props.isBlock && 'inline-flex'};
color: ${props => props.color || props.theme.linkColor};
text-align: center;
font-size: 18px;
text-decoration: none;
align-items: center;
@media (max-width: 768px) {
}
svg {
margin-left: 3px;
}
`;