Skip to content

Commit

Permalink
allow Link to have the role attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
danilo-leal committed Jun 12, 2024
1 parent f610966 commit 6896b2e
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 7 additions & 0 deletions docs/pages/experiments/website/branding-theme-test.tsx
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ import AppHeader from 'docs/src/layouts/AppHeader';
import Section from 'docs/src/layouts/Section';
import AppFooter from 'docs/src/layouts/AppFooter';
import GitHubIcon from '@mui/icons-material/GitHub';
import { Link } from '@mui/docs/Link';

export default function BrandingThemeTest() {
return (
@@ -18,6 +19,12 @@ export default function BrandingThemeTest() {
<AppHeader gitHubRepository="https://github.com/mui/material-ui" />
<main id="main-content">
<Section>
<Stack direction="row" spacing={2} useFlexGap sx={{ width: 'fit-content', mb: 4 }}>
<Link href="/">Link with no role</Link>
<Link href="/" role="menuitem">
Link role menuitem
</Link>
</Stack>
<Stack direction="row" spacing={2} useFlexGap sx={{ width: 'fit-content' }}>
<Chip size="small" variant="outlined" color="primary" label="Hiring" />
<Chip size="small" variant="outlined" color="info" label="Hiring" />
1 change: 0 additions & 1 deletion packages/mui-docs/src/Link/Link.tsx
Original file line number Diff line number Diff line change
@@ -80,7 +80,6 @@ export const Link = React.forwardRef<HTMLAnchorElement, LinkProps>(function Link
noLinkStyle,
prefetch,
replace,
role, // Link don't have roles.
scroll,
shallow,
...other

0 comments on commit 6896b2e

Please sign in to comment.