From 60a9efaf925f19bea819f589e4b399a89d35bc4b Mon Sep 17 00:00:00 2001 From: DiegoAndai Date: Thu, 1 Aug 2024 09:40:52 -0400 Subject: [PATCH 1/2] Fix broken links --- .../creating-themed-components.md | 2 +- .../material/customization/css-theme-variables/usage.md | 2 +- .../migration/migration-grid-v2/migration-grid-v2.md | 2 +- .../material/migration/migration-v4/v5-component-changes.md | 6 +++--- docs/data/system/styled/styled.md | 2 +- docs/pages/blog/mui-core-v5.md | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/data/material/customization/creating-themed-components/creating-themed-components.md b/docs/data/material/customization/creating-themed-components/creating-themed-components.md index 15cf2415c18c14..1b9d7984ab7dca 100644 --- a/docs/data/material/customization/creating-themed-components/creating-themed-components.md +++ b/docs/data/material/customization/creating-themed-components/creating-themed-components.md @@ -22,7 +22,7 @@ This guide will walk you through how to build this statistics component, which a ### 1. Create the component slots -Slots let you customize each individual element of the component by targeting its respective name in the [theme's styleOverrides](/material-ui/customization/theme-components/#theme-style-overrides) and [theme's variants](/material-ui/customization/theme-components/#creating-new-component-variants). +Slots let you customize each individual element of the component by targeting its respective name in the [theme's styleOverrides](/material-ui/customization/theme-components/#theme-style-overrides) and [theme's variants](/material-ui/customization/theme-components/#variants). This statistics component is composed of three slots: diff --git a/docs/data/material/customization/css-theme-variables/usage.md b/docs/data/material/customization/css-theme-variables/usage.md index 54e15baeba694d..c026d8f1e57e0d 100644 --- a/docs/data/material/customization/css-theme-variables/usage.md +++ b/docs/data/material/customization/css-theme-variables/usage.md @@ -348,7 +348,7 @@ Or use `var()` to refer to the CSS variable directly: ``` :::warning -If you're using a [custom prefix](/material-ui/customization/css-theme-variables/configuration/#changing-variable-prefixes), make sure to replace the default `--mui`. +If you're using a [custom prefix](/material-ui/customization/css-theme-variables/configuration/#customizing-variable-prefix), make sure to replace the default `--mui`. ::: For **TypeScript**, you need to augment the [palette interfaces](#palette-interfaces). diff --git a/docs/data/material/migration/migration-grid-v2/migration-grid-v2.md b/docs/data/material/migration/migration-grid-v2/migration-grid-v2.md index d885b13b4caaf0..af4312ca3674dc 100644 --- a/docs/data/material/migration/migration-grid-v2/migration-grid-v2.md +++ b/docs/data/material/migration/migration-grid-v2/migration-grid-v2.md @@ -80,7 +80,7 @@ The Grid v2 is marked as stable in Material UI v6, so the `Unstable_` prefix is ``` Alongside the stabilization, the API has been improved. -You can see the changes and further details of how to migrate in the [Material UI v6 migration guide](/material-ui/migrating-to-v6/). +You can see the changes and further details of how to migrate in the [Material UI v6 migration guide](/material-ui/migration/migrating-to-v6/#grid-v2-unstable-grid). Finally, the original Grid component is deprecated and will be removed in the future, so we highly encourage you to migrate to Grid v2. diff --git a/docs/data/material/migration/migration-v4/v5-component-changes.md b/docs/data/material/migration/migration-v4/v5-component-changes.md index f2f179a7b0d820..8fa8f2b793e237 100644 --- a/docs/data/material/migration/migration-v4/v5-component-changes.md +++ b/docs/data/material/migration/migration-v4/v5-component-changes.md @@ -744,7 +744,7 @@ The props `alignItems`, `alignContent`, and `justifyContent`—along with their These props are now considered part of MUI System, not the `Grid` component itself. -If you still wish to add overrides for them, you can use the [callback as a value in `styleOverrides`](/material-ui/customization/theme-components/#overrides-based-on-props). +If you still wish to add overrides for them, you can use the [callback as a value in `styleOverrides`](https://v5.mui.com/material-ui/customization/theme-components/#overrides-based-on-props). ```diff const theme = createTheme({ @@ -775,7 +775,7 @@ If you need negative margins on all sides, we recommend using the new Grid v2 in + import Grid from '@mui/material/Grid2'; ``` -To learn more about the Grid v2, check out the [demos](/material-ui/react-grid2/#whats-changed) and the [Grid migration guide](/material-ui/migration/migration-grid-v2/). +To learn more about the Grid v2, check out the [demos](/material-ui/react-grid2/) and the [Grid migration guide](/material-ui/migration/migration-grid-v2/). :::info Grid v2 was introduced in Material UI v5.9.1 and features negative margins on all sides by default. @@ -1862,7 +1862,7 @@ The following classes and style overrides keys were removed: These props are now considered part of MUISystem rather than the `Typography` component itself. -If you still wish to add overrides for them, you can use the [callback as a value in `styleOverrides`](/material-ui/customization/theme-components/#overrides-based-on-props). +If you still wish to add overrides for them, you can use the [callback as a value in `styleOverrides`](https://v5.mui.com/material-ui/customization/theme-components/#overrides-based-on-props). For example: diff --git a/docs/data/system/styled/styled.md b/docs/data/system/styled/styled.md index 146ceb86ef1c98..d2830fa5105c10 100644 --- a/docs/data/system/styled/styled.md +++ b/docs/data/system/styled/styled.md @@ -18,7 +18,7 @@ The utility can be used as a replacement for emotion's or styled-components' sty It aims to solve the same problem, but also provides the following benefits: 1. It uses a default `theme` if no theme is available in React context. -2. It supports the theme's [`styleOverrides`](/material-ui/customization/theme-components/#theme-style-overrides) and [`variants`](/material-ui/customization/theme-components/#creating-new-component-variants) to be applied, based on the `name` applied in the options (can be skipped). +2. It supports the theme's [`styleOverrides`](/material-ui/customization/theme-components/#theme-style-overrides) and [`variants`](/material-ui/customization/theme-components/#variants) to be applied, based on the `name` applied in the options (can be skipped). 3. It adds support for the [the `sx` prop](/system/getting-started/the-sx-prop/) (can be skipped). 4. It adds by default the `shouldForwardProp` option (that can be overridden), taking into account: `ownerState`, `theme`, `sx`, and `as`. diff --git a/docs/pages/blog/mui-core-v5.md b/docs/pages/blog/mui-core-v5.md index 6716f671988b86..790cfaf174ae60 100644 --- a/docs/pages/blog/mui-core-v5.md +++ b/docs/pages/blog/mui-core-v5.md @@ -236,7 +236,7 @@ declare module '@mui/material/Button' {

CodeSandbox

-**Second**, you can add [custom variants](/material-ui/customization/theme-components/#creating-new-component-variants) to the theme, overriding the CSS for specific component prop combinations. +**Second**, you can add [custom variants](https://v5.mui.com/material-ui/customization/theme-components/#creating-new-component-variants) to the theme, overriding the CSS for specific component prop combinations. ```jsx import { createTheme, Button } from '@mui/material'; From 02e2b2caee84aac14e304873008c13eb321c4b86 Mon Sep 17 00:00:00 2001 From: DiegoAndai Date: Fri, 23 Aug 2024 12:38:15 -0400 Subject: [PATCH 2/2] Remove broken links --- docs/.link-check-errors.txt | 3 --- .../material/migration/migration-grid-v2/migration-grid-v2.md | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/docs/.link-check-errors.txt b/docs/.link-check-errors.txt index 24f1ff82c9158b..0b8d083f4a0077 100644 --- a/docs/.link-check-errors.txt +++ b/docs/.link-check-errors.txt @@ -1,5 +1,2 @@ Broken links found by `pnpm docs:link-check` that exist: -- https://mui.com/material-ui/customization/theme-components/#creating-new-component-variants -- https://mui.com/material-ui/customization/theme-components/#overrides-based-on-props -- https://mui.com/material-ui/react-grid2/#whats-changed diff --git a/docs/data/material/migration/migration-grid-v2/migration-grid-v2.md b/docs/data/material/migration/migration-grid-v2/migration-grid-v2.md index f7bd47adcf7a11..41ce6e24d68ce0 100644 --- a/docs/data/material/migration/migration-grid-v2/migration-grid-v2.md +++ b/docs/data/material/migration/migration-grid-v2/migration-grid-v2.md @@ -80,7 +80,7 @@ The Grid v2 is marked as stable in Material UI v6, so the `Unstable_` prefix is ``` Alongside the stabilization, the API has been improved. -You can see the changes and further details on how to migrate in the [Material UI v6 upgrade guide](/material-ui/migration/upgrade-to-v6/#grid-v2-unstable-grid). +You can see the changes and further details on how to migrate in the [Material UI v6 upgrade guide](/material-ui/migration/upgrade-to-v6/#grid2). Finally, the original Grid component is deprecated and will be removed in the future, so we highly encourage you to migrate to Grid v2.