-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[link] Support extending theme color with color
prop
#29596
Comments
These colors are soft-deprecated: <Link href="#" color="primary">
<Link href="#" color="secondary">
<Link href="#" color="error">
<Link href="#" color="warning"> There is already a note about it in the codebase: It's a legacy from the API of v4. In v5, the I think that it would be great fully rely on the system, and remove all the custom logic in the Link. Now, there could be another discussion for the system, not the Link. |
color
prop support more color from palette
The <Link
href="#"
sx={(theme) => {
return {
color: "error.main",
textDecorationColor: alpha(theme.palette.error.main, 0.4)
};
}}
>
Warning
</Link> if the alpha channel is 0.4. |
Great point, then maybe we should have the Link's color API match the Button's color API? The If we do such, then I think that we would need to
For the Typography, I think that we should remove the custom values as it create confusion/duplication with the system: |
color
prop handling
IMO that's the right choice. I just got bit by this and had to step through MUI internals to figure out where I'd gone wrong. |
color
prop handlingcolor
prop handling
color
prop handlingcolor
prop
Summary 💡
Currently
Link
component'scolor
prop can receive"primary" | "secondary" | "error"
, for other palette such aswarning
, a.main
postfix is needed, so does custom palette.The current behavior is shown in a code sandbox.
Expect the
.main
postfix is not needed.Examples 🌈
Working code currently:
Expected behaviour:
The text was updated successfully, but these errors were encountered: