-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[docs] Push the fixes on Next.js's Link to the examples #28178
[docs] Push the fixes on Next.js's Link to the examples #28178
Conversation
804c4e1
to
40615fc
Compare
40615fc
to
8a15a4f
Compare
import { styled } from '@mui/material/styles'; | ||
|
||
// Add support for the sx prop for consistency with the other branches. | ||
const Anchor = styled('a')({}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep the example minimal. There is no need to add another learning layer. Consistency is not a target.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's meant as a bug fix. This style allows getting the sx
prop no matter the params (using external links or not). I believe @siriwatknp added it because it noticed that it wasn't always present.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have created https://codesandbox.io/s/polished-wood-31j6t?file=/pages/index.js to illustrate the bug fixed
I think that there should be a single Link component source branch (even if the source are duplicated between files). If we are feel the source gets too complicated, then its the sign that we need to expose dedicated component from MUI, e.g. '@mui/material/NextLink'.
href
for AppDrawerNavItems #27936 to remove the support for thepassHref
prop, it doesn't make sense in our context.ref
type fromcomponent
#28101 to remove the typecasting, TypeScript is also smarter in the latest version.cursor: pointer
as it was previously hiding a root issue, and we never need it.