Format all files with prettier config for baseline

This commit is contained in:
Alex Holliday committed 2024-10-17 12:05:06 +08:00
1 parent d8e2b06eca
commit 15ab9f8bc8
132 files changed
+24210 -23747

No files matched your search

+42 -42
View File
@@ -11,52 +11,52 @@ import PropTypes from "prop-types";
*/
const Link = ({ level, label, url }) => {
const theme = useTheme();
const theme = useTheme();
const levelConfig = {
primary: {},
secondary: {
color: theme.palette.text.secondary,
sx: {
":hover": {
color: theme.palette.text.secondary,
},
},
},
tertiary: {
color: theme.palette.text.tertiary,
sx: {
textDecoration: "underline",
textDecorationStyle: "dashed",
textDecorationColor: theme.palette.primary.main,
textUnderlineOffset: "1px",
":hover": {
color: theme.palette.text.tertiary,
textDecorationColor: theme.palette.primary.main,
backgroundColor: theme.palette.background.fill,
},
},
},
error: {},
};
const { sx, color } = levelConfig[level];
return (
<MuiLink
href={url}
sx={{ width: "fit-content", ...sx }}
color={color}
target="_blank"
rel="noreferrer"
>
{label}
</MuiLink>
);
const levelConfig = {
primary: {},
secondary: {
color: theme.palette.text.secondary,
sx: {
":hover": {
color: theme.palette.text.secondary,
},
},
},
tertiary: {
color: theme.palette.text.tertiary,
sx: {
textDecoration: "underline",
textDecorationStyle: "dashed",
textDecorationColor: theme.palette.primary.main,
textUnderlineOffset: "1px",
":hover": {
color: theme.palette.text.tertiary,
textDecorationColor: theme.palette.primary.main,
backgroundColor: theme.palette.background.fill,
},
},
},
error: {},
};
const { sx, color } = levelConfig[level];
return (
<MuiLink
href={url}
sx={{ width: "fit-content", ...sx }}
color={color}
target="_blank"
rel="noreferrer"
>
{label}
</MuiLink>
);
};
Link.propTypes = {
url: PropTypes.string.isRequired,
level: PropTypes.oneOf(["primary", "secondary", "tertiary", "error"]),
label: PropTypes.string.isRequired,
url: PropTypes.string.isRequired,
level: PropTypes.oneOf(["primary", "secondary", "tertiary", "error"]),
label: PropTypes.string.isRequired,
};
export default Link;