@ -1,8 +1,15 @@
|
|||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link, LinkProps } from 'react-router-dom';
|
||||||
|
|
||||||
const StyledUndecoratedLink = styled(Link)<{ fullWidth: boolean }>`
|
type StyledLinkProps = LinkProps & {
|
||||||
|
fullWidth?: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
|
const StyledUndecoratedLink = styled(
|
||||||
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
||||||
|
({ fullWidth: _, ...props }: StyledLinkProps) => <Link {...props} />,
|
||||||
|
)<StyledLinkProps>`
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
width: ${({ fullWidth }) => (fullWidth ? '100%' : 'auto')};
|
width: ${({ fullWidth }) => (fullWidth ? '100%' : 'auto')};
|
||||||
`;
|
`;
|
||||||
|
|||||||
Reference in New Issue
Block a user