Files
twenty/front/src/modules/ui/link/components/RawLink.tsx
Charles Bochet d6afbe8e8e Introduce accent for chips (#911)
* Introduce accent for chips

* Add top bar on Mobile on Settings pages

* Various fixes

* Fix according to peer review
2023-07-24 16:49:33 -07:00

31 lines
667 B
TypeScript

import * as React from 'react';
import { Link as ReactLink } from 'react-router-dom';
import styled from '@emotion/styled';
type OwnProps = {
className?: string;
href: string;
children?: React.ReactNode;
onClick?: (event: React.MouseEvent<HTMLElement>) => void;
};
const StyledClickable = styled.div`
display: flex;
overflow: hidden;
white-space: nowrap;
a {
color: inherit;
}
`;
export function RawLink({ className, href, children, onClick }: OwnProps) {
return (
<StyledClickable className={className}>
<ReactLink target="_blank" onClick={onClick} to={href}>
{children}
</ReactLink>
</StyledClickable>
);
}