Files
twenty/front/src/modules/ui/components/links/PrimaryLink.tsx
Lucas Bordeau be21392737 Feat/company card fields (#686)
* wip

* Ok

* asd

* Fixed cancel submit

* Renamed

* Fixed
2023-07-15 19:17:31 -07:00

30 lines
658 B
TypeScript

import React from 'react';
import { Link as ReactLink } from 'react-router-dom';
import styled from '@emotion/styled';
type OwnProps = {
children: React.ReactNode;
href: string;
onClick?: () => void;
fullWidth?: boolean;
};
const StyledClickable = styled.div`
display: flex;
a {
color: ${({ theme }) => theme.font.color.tertiary};
font-size: ${({ theme }) => theme.font.size.sm};
text-decoration: underline;
}
`;
export function PrimaryLink({ href, children, onClick }: OwnProps) {
return (
<StyledClickable>
<ReactLink onClick={onClick} to={href}>
{children}
</ReactLink>
</StyledClickable>
);
}