* fix: add ellipsis in all table cells * fix: workspace click redirect to home * fix: add company chip story and edit comment cell story * fix: remove cursor pointer on workspace name * fix: snoop pill height * fix: rebase
30 lines
635 B
TypeScript
30 lines
635 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;
|
|
|
|
a {
|
|
color: inherit;
|
|
text-decoration: none;
|
|
}
|
|
`;
|
|
|
|
export function RawLink({ className, href, children, onClick }: OwnProps) {
|
|
return (
|
|
<StyledClickable className={className}>
|
|
<ReactLink onClick={onClick} to={href}>
|
|
{children}
|
|
</ReactLink>
|
|
</StyledClickable>
|
|
);
|
|
}
|