import React from 'react'; import Icon from '../Icon/Icon'; import { iconTypes } from '../Icon/collection'; import color from '../../styles/colors'; import { LinkToProps } from './types'; import styles from './LinkTo.styles'; const { InternalLinkStyled, LinkStyled, SpanStyledFlex, SpanStyledText } = styles; const LinkTo: React.FC = ({ address, text, type = 'external', iconLayout = 'leading', ...props }) => { const renderContent = () => ( {type !== 'internal' && ( )} {text || address} ); return type !== 'internal' ? ( {renderContent()} ) : ( {renderContent()} ); }; export default LinkTo;