From 11016d35cf8ba2c7c6eb2d0af74fa71a94591321 Mon Sep 17 00:00:00 2001 From: sai6855 <60743144+sai6855@users.noreply.github.com> Date: Mon, 24 Jul 2023 19:19:14 +0530 Subject: [PATCH] test for https://github.com/mui/material-ui/issues/38079 --- packages/mui-material/src/Button/Button.spec.tsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 */}