From 6f04b86ec8284b230a637d5e06274bf0e1dfa06b Mon Sep 17 00:00:00 2001 From: fzaninotto Date: Mon, 5 Jun 2023 14:40:26 +0200 Subject: [PATCH] Update `` to honor the `underline` prop --- packages/ra-ui-materialui/src/Link.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/ra-ui-materialui/src/Link.tsx b/packages/ra-ui-materialui/src/Link.tsx index a161a80cb89..3e49368a634 100644 --- a/packages/ra-ui-materialui/src/Link.tsx +++ b/packages/ra-ui-materialui/src/Link.tsx @@ -16,6 +16,7 @@ export const Link = (props: LinkProps) => { component={RRLink} to={to} className={clsx(LinkClasses.link, className)} + underline="none" {...rest} > {children} @@ -29,11 +30,7 @@ export const LinkClasses = { link: `${PREFIX}-link`, }; -const StyledMuiLink = styled(MuiLink)(({ theme }) => ({ - [`&.${LinkClasses.link}`]: { - textDecoration: 'none', - }, -})) as typeof MuiLink; // @see https://mui.com/material-ui/guides/typescript/#complications-with-the-component-prop +const StyledMuiLink = styled(MuiLink)({}) as typeof MuiLink; // @see https://mui.com/material-ui/guides/typescript/#complications-with-the-component-prop // @see https://mui.com/material-ui/guides/composition/#with-typescript export interface LinkProps