Clear git cache

This commit is contained in:
Hazem Krimi
2023-05-28 16:44:06 +01:00
parent 2a71d7927c
commit a5b7dfd72e
178 changed files with 29055 additions and 0 deletions
+52
View File
@@ -0,0 +1,52 @@
import { Link as RouterLink } from 'react-router-dom';
import { Wrapper } from './styles';
type LinkProps = {
href?: string;
url?: boolean;
children?: React.ReactNode | JSX.Element | string;
color?:
| 'client'
| 'productOwner'
| 'developer'
| 'admin'
| 'success'
| 'warning'
| 'error'
| 'black'
| 'white'
| string;
selected?: boolean;
className?: string;
iconLeft?: React.FunctionComponentElement<React.SVGProps<SVGSVGElement>>;
onClick?: () => void;
target?: '_self' | '_blank';
};
const Link = ({
href,
url = false,
children,
iconLeft,
selected = false,
target = '_self',
...props
}: LinkProps) => {
return (
<Wrapper {...props} selected={selected}>
{href && !url ? (
<RouterLink to={href} target={target}>
{iconLeft && <span className='icon left'>{iconLeft}</span>}
{children}
</RouterLink>
) : (
<a href={href} target={target}>
{iconLeft && <span className='icon left'>{iconLeft}</span>}
{children}
</a>
)}
</Wrapper>
);
};
export default Link;