Fix link default prop

This commit is contained in:
Manav Rathi
2025-01-22 14:14:18 +05:30
parent 5e317b9f37
commit 1015c87dd2
2 changed files with 12 additions and 4 deletions

View File

@@ -187,7 +187,7 @@ export const AlbumCastDialog: React.FC<AlbumCastDialogProps> = ({
{view == "pin" && (
<>
<Stack sx={{ gap: 2, mb: 2 }}>
<Typography>
<Typography sx={{ color: "text.muted" }}>
<Trans
i18nKey="visit_cast_url"
components={{
@@ -196,7 +196,9 @@ export const AlbumCastDialog: React.FC<AlbumCastDialogProps> = ({
values={{ url: castHost }}
/>
</Typography>
<Typography>{t("enter_cast_pin_code")}</Typography>
<Typography sx={{ color: "text.muted" }}>
{t("enter_cast_pin_code")}
</Typography>
</Stack>
<SingleInputForm
callback={onSubmit}

View File

@@ -627,15 +627,21 @@ const components: Components = {
},
},
// The default link "color" prop is "primary", which maps to "fill.base"
// (and equivalently, to "text.base"). In our current designs, the <Link>
// MUI component is only used in places where the surrounding text uses
// "text.muted", so this default already provides it a highlight compared to
// the text it in embedded in.
//
// We additionally disable the underline, and add a hover indication by
// switching its color to the main accent.
MuiLink: {
defaultProps: {
color: "var(--mui-palette-accent-main)",
underline: "none",
},
styleOverrides: {
root: {
"&:hover": {
underline: "always",
color: "var(--mui-palette-accent-main)",
},
},