diff --git a/src/components/Link/index.tsx b/src/components/Link/index.tsx index 22f7fb2..6fdd3b3 100644 --- a/src/components/Link/index.tsx +++ b/src/components/Link/index.tsx @@ -2,7 +2,8 @@ import { Link as RouterLink } from 'react-router-dom'; import { Wrapper } from './styles'; type LinkProps = { - href: string; + href?: string; + url?: boolean; children?: React.ReactNode | JSX.Element | string; color?: | 'client' @@ -19,21 +20,31 @@ type LinkProps = { className?: string; iconLeft?: React.SVGProps; onClick?: () => void; + target?: '_self' | '_blank'; }; const Link = ({ href, + url = false, children, iconLeft, selected = false, + target = '_self', ...props }: LinkProps) => { return ( - - {iconLeft && {iconLeft}} - {children} - + {href && !url ? ( + + {iconLeft && {iconLeft}} + {children} + + ) : ( + + {iconLeft && {iconLeft}} + {children} + + )} ); };