Skip to content

Commit 6f04b86

Browse files
committed
Update <Link> to honor the underline prop
1 parent e21486c commit 6f04b86

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

packages/ra-ui-materialui/src/Link.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export const Link = (props: LinkProps) => {
1616
component={RRLink}
1717
to={to}
1818
className={clsx(LinkClasses.link, className)}
19+
underline="none"
1920
{...rest}
2021
>
2122
{children}
@@ -29,11 +30,7 @@ export const LinkClasses = {
2930
link: `${PREFIX}-link`,
3031
};
3132

32-
const StyledMuiLink = styled(MuiLink)(({ theme }) => ({
33-
[`&.${LinkClasses.link}`]: {
34-
textDecoration: 'none',
35-
},
36-
})) as typeof MuiLink; // @see https://mui.com/material-ui/guides/typescript/#complications-with-the-component-prop
33+
const StyledMuiLink = styled(MuiLink)({}) as typeof MuiLink; // @see https://mui.com/material-ui/guides/typescript/#complications-with-the-component-prop
3734

3835
// @see https://mui.com/material-ui/guides/composition/#with-typescript
3936
export interface LinkProps

0 commit comments

Comments
 (0)