diff --git a/packages/mui-material/src/Button/Button.spec.tsx b/packages/mui-material/src/Button/Button.spec.tsx index 97a272435c1c14..d3b03c32bc29c9 100644 --- a/packages/mui-material/src/Button/Button.spec.tsx +++ b/packages/mui-material/src/Button/Button.spec.tsx @@ -1,5 +1,6 @@ import * as React from 'react'; import Button, { ButtonProps } from '@mui/material/Button'; +import MuiLink, { LinkProps as MuiLinkProps } from '@mui/material/Link'; import { Link as ReactRouterLink, LinkProps } from 'react-router-dom'; import { expectType } from '@mui/types'; @@ -9,6 +10,15 @@ const TestOverride = React.forwardRef((props, re
)); +type CustomLinkProps = MuiLinkProps; +const CustomLink: React.FC> = ({ children, ...props }) => { + return ( + + {children} + + ); +}; + function FakeIcon() { return
Icon
; } @@ -64,6 +74,9 @@ const buttonTest = () => ( + {/* By default the underlying component is a button element */}