Skip to content

Commit

Permalink
[docs] Fix API links for pickers (#9573)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfauquette authored Jul 6, 2023
1 parent ca8d550 commit 9b448a8
Show file tree
Hide file tree
Showing 47 changed files with 117 additions and 66 deletions.
2 changes: 1 addition & 1 deletion benchmark/browser/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This project is used when running the following command:

```sh
```bash
yarn browser
```

Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This is the documentation website of MUI X.

To start the docs site in development mode, from the project root, run:

```sh
```bash
yarn && yarn docs:dev
```

Expand Down
9 changes: 7 additions & 2 deletions docs/data/charts/overview/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,17 @@ To modify the styling of charts you can rely on all the MUI styling tools, such

To install this library, run

```sh
<codeblock storageKey="package-manager">
```bash npm
npm install @mui/x-charts
// or
```

```bash yarn
yarn add @mui/x-charts
```

</codeblock>

## Display charts

Charts can be rendered in two ways.
Expand Down
18 changes: 12 additions & 6 deletions docs/data/data-grid/getting-started/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,17 @@ Using your favorite package manager, install `@mui/x-data-grid-pro` or `@mui/x-d
The Data Grid package has a peer dependency on `@mui/material`.
If you are not already using it in your project, you can install it with:

```sh
// with npm
<codeblock storageKey="package-manager">
```bash npm
npm install @mui/material @emotion/react @emotion/styled
```

// with yarn
```bash yarn
yarn add @mui/material @emotion/react @emotion/styled
```

</codeblock>

<!-- #react-peer-version -->

Please note that [react](https://www.npmjs.com/package/react) and [react-dom](https://www.npmjs.com/package/react-dom) are peer dependencies too:
Expand All @@ -34,14 +37,17 @@ Please note that [react](https://www.npmjs.com/package/react) and [react-dom](ht

Material UI is using [Emotion](https://emotion.sh/docs/introduction) as a styling engine by default. If you want to use [`styled-components`](https://styled-components.com/) instead, run:

```sh
// with npm
<codeblock storageKey="package-manager">
```bash npm
npm install @mui/styled-engine-sc styled-components
```

// with yarn
```bash yarn
yarn add @mui/styled-engine-sc styled-components
```

</codeblock>

Take a look at the [Styled engine guide](/material-ui/guides/styled-engine/) for more information about how to configure `styled-components` as the style engine.

## Quickstart
Expand Down
1 change: 1 addition & 0 deletions docs/data/date-pickers/adapters-locale/adapters-locale.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
productId: x-date-pickers
title: Date and Time pickers - Date localization
components: LocalizationProvider
githubLabel: 'component: pickers'
Expand Down
1 change: 1 addition & 0 deletions docs/data/date-pickers/base-concepts/base-concepts.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
productId: x-date-pickers
title: Date and Time Picker - Base concepts
packageName: '@mui/x-date-pickers'
githubLabel: 'component: pickers'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
productId: x-date-pickers
title: Date and Time pickers - Calendar systems
components: LocalizationProvider
githubLabel: 'component: pickers'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
productId: x-date-pickers
title: Date and Time pickers - Custom subcomponents
components: DateTimePickerTabs
---
Expand Down
1 change: 1 addition & 0 deletions docs/data/date-pickers/custom-field/custom-field.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
productId: x-date-pickers
title: Date and Time pickers - Custom field
githubLabel: 'component: pickers'
packageName: '@mui/x-date-pickers'
Expand Down
1 change: 1 addition & 0 deletions docs/data/date-pickers/custom-layout/custom-layout.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
productId: x-date-pickers
title: Date and Time pickers - Custom layout
components: PickersActionBar, PickersLayout
githubLabel: 'component: pickers'
Expand Down
1 change: 1 addition & 0 deletions docs/data/date-pickers/date-calendar/date-calendar.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
productId: x-date-pickers
title: React Date Calendar component
components: DateCalendar, MonthCalendar, YearCalendar, PickersDay, DayCalendarSkeleton
githubLabel: 'component: DatePicker'
Expand Down
1 change: 1 addition & 0 deletions docs/data/date-pickers/date-field/date-field.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
productId: x-date-pickers
title: React Date Field component
components: DateField
githubLabel: 'component: pickers'
Expand Down
1 change: 1 addition & 0 deletions docs/data/date-pickers/date-picker/date-picker.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
productId: x-date-pickers
title: React Date Picker component
components: DatePicker, DesktopDatePicker, MobileDatePicker, StaticDatePicker
githubLabel: 'component: DatePicker'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
productId: x-date-pickers
title: React Date Range Calendar component
components: DateRangeCalendar
githubLabel: 'component: DateRangePicker'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
productId: x-date-pickers
title: React Date Range Field components
components: MultiInputDateRangeField, SingleInputDateRangeField
githubLabel: 'component: pickers'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
productId: x-date-pickers
title: React Date Range Picker component
components: DateRangePicker, DesktopDateRangePicker, MobileDateRangePicker, StaticDateRangePicker, DateRangeCalendar, DateRangePickerDay
githubLabel: 'component: DateRangePicker'
Expand Down
1 change: 1 addition & 0 deletions docs/data/date-pickers/date-time-field/date-time-field.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
productId: x-date-pickers
title: React Date Field component
components: DateTimeField
githubLabel: 'component: pickers'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
productId: x-date-pickers
title: React Date Time Picker component
components: DateTimePicker, DesktopDateTimePicker, MobileDateTimePicker, StaticDateTimePicker
githubLabel: 'component: DateTimePicker'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
productId: x-date-pickers
title: React Date Time Range Field components
components: MultiInputDateTimeRangeField, SingleInputDateTimeRangeField
githubLabel: 'component: pickers'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
productId: x-date-pickers
title: React Date Time Range Picker component
githubLabel: 'component: DateTimeRangePicker'
packageName: '@mui/x-date-pickers-pro'
Expand Down
1 change: 1 addition & 0 deletions docs/data/date-pickers/digital-clock/digital-clock.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
productId: x-date-pickers
title: React Digital Clock component
components: DigitalClock, MultiSectionDigitalClock
githubLabel: 'component: TimePicker'
Expand Down
1 change: 1 addition & 0 deletions docs/data/date-pickers/fields/fields.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
productId: x-date-pickers
title: React Date Fields components
components: DateField, TimeField, DateTimeField, MultiInputDateRangeField, SingleInputDateRangeField, MultiInputTimeRangeField, SingleInputTimeRangeField, MultiInputDateTimeRangeField, SingleInputDateTimeRangeField
githubLabel: 'component: pickers'
Expand Down
19 changes: 12 additions & 7 deletions docs/data/date-pickers/getting-started/getting-started.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
productId: x-date-pickers
title: Date and Time Picker - Getting started
packageName: '@mui/x-date-pickers'
githubLabel: 'component: pickers'
Expand Down Expand Up @@ -27,13 +28,14 @@ take a look at the [dedicated section](/x/react-date-pickers/#date-library)
The Date and Time Pickers package has a peer dependency on `@mui/material`.
If you are not already using it in your project, you can install it with:

```sh
// with npm
<codeblock storageKey="package-manager">
```bash npm
npm install @mui/material @emotion/react @emotion/styled

// with yarn
```
```bash yarn
yarn add @mui/material @emotion/react @emotion/styled
```
</codeblock>

<!-- #react-peer-version -->

Expand All @@ -50,14 +52,17 @@ Please note that [react](https://www.npmjs.com/package/react) and [react-dom](ht

Material UI is using [Emotion](https://emotion.sh/docs/introduction) as a styling engine by default. If you want to use [`styled-components`](https://styled-components.com/) instead, run:

```sh
// with npm
<codeblock storageKey="package-manager">
```bash npm
npm install @mui/styled-engine-sc styled-components
```

// with yarn
```bash yarn
yarn add @mui/styled-engine-sc styled-components
```

</codeblock>

Take a look at the [Styled engine guide](/material-ui/guides/styled-engine/) for more information about how to configure `styled-components` as the style engine.

## Setup your date library adapter
Expand Down
1 change: 1 addition & 0 deletions docs/data/date-pickers/lifecycle/lifecycle.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
productId: x-date-pickers
title: Components lifecycle
githubLabel: 'component: pickers'
packageName: '@mui/x-date-pickers'
Expand Down
1 change: 1 addition & 0 deletions docs/data/date-pickers/localization/localization.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
productId: x-date-pickers
title: Date and Time Pickers - Component localization
components: LocalizationProvider
githubLabel: 'component: pickers'
Expand Down
1 change: 1 addition & 0 deletions docs/data/date-pickers/overview/overview.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
productId: x-date-pickers
title: Date and Time Picker React components
packageName: '@mui/x-date-pickers'
githubLabel: 'component: pickers'
Expand Down
1 change: 1 addition & 0 deletions docs/data/date-pickers/shortcuts/shortcuts.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
productId: x-date-pickers
title: Date and Time pickers - Shortcuts
components: PickersShortcuts
---
Expand Down
1 change: 1 addition & 0 deletions docs/data/date-pickers/time-clock/time-clock.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
productId: x-date-pickers
title: React Time Clock component
components: TimeClock
githubLabel: 'component: TimePicker'
Expand Down
1 change: 1 addition & 0 deletions docs/data/date-pickers/time-field/time-field.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
productId: x-date-pickers
title: React Time Field component
components: TimeField
githubLabel: 'component: pickers'
Expand Down
1 change: 1 addition & 0 deletions docs/data/date-pickers/time-picker/time-picker.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
productId: x-date-pickers
title: React Time Picker component
components: TimePicker, DesktopTimePicker, MobileTimePicker, StaticTimePicker
githubLabel: 'component: TimePicker'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
productId: x-date-pickers
title: React Time Range Field components
components: MultiInputTimeRangeField, SingleInputTimeRangeField
githubLabel: 'component: pickers'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
productId: x-date-pickers
title: React Time Range Picker component
githubLabel: 'component: TimeRangePicker'
packageName: '@mui/x-date-pickers-pro'
Expand Down
1 change: 1 addition & 0 deletions docs/data/date-pickers/timezone/timezone.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
productId: x-date-pickers
title: Date and Time pickers - UTC and timezones
components: LocalizationProvider
githubLabel: 'component: pickers'
Expand Down
1 change: 1 addition & 0 deletions docs/data/date-pickers/validation/validation.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
productId: x-date-pickers
components: DatePicker, DesktopDatePicker, MobileDatePicker, StaticDatePicker, TimePicker, DesktopTimePicker, MobileTimePicker, StaticTimePicker, DateTimePicker, DesktopDateTimePicker, MobileDateTimePicker, StaticDateTimePicker, DateRangePicker, DesktopDateRangePicker, MobileDateRangePicker, StaticDateRangePicker
githubLabel: 'component: pickers'
packageName: '@mui/x-date-pickers'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The `preset-safe` codemod will automatically adjust the bulk of your code to acc

You can either run it on a specific file, folder, or your entire codebase when choosing the `<path>` argument.

```sh
```bash
// Data Grid specific
npx @mui/x-codemod v6.0.0/data-grid/preset-safe <path>
// Target Date and Time pickers as well
Expand Down Expand Up @@ -495,7 +495,7 @@ To smooth the transition, data grid support both the `components` props which ar
If you would like to use the new API and do not want to see deprecated prop usage, consider running `rename-components-to-slots` codemod handling the prop renaming.
```sh
```bash
npx @mui/x-codemod v6.0.0/data-grid/rename-components-to-slots <path>
```
Expand Down
20 changes: 13 additions & 7 deletions docs/data/migration/migration-pickers-lab/migration-pickers-lab.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,30 @@ If you already have a license for `@mui/x-data-grid-pro`, you can use the same o

#### Community Plan

```sh
// with npm
<codeblock storageKey="package-manager">
```bash npm
npm install @mui/x-date-pickers
```

// with yarn
```bash yarn
yarn add @mui/x-date-pickers
```

</codeblock>

#### Pro Plan

```sh
// with npm
<codeblock storageKey="package-manager">
```bash npm
npm install @mui/x-date-pickers-pro @mui/x-license-pro
```

// with yarn
```bash yarn
yarn add @mui/x-date-pickers-pro @mui/x-license-pro
```

</codeblock>

When you purchase a commercial license, you'll receive a license key by email.
You must set the license key before rendering the first component.

Expand All @@ -66,7 +72,7 @@ We have prepared a codemod to help you migrate your codebase.

You can either run it on a specific file, folder, or your entire codebase when choosing the `<path>` argument.

```sh
```bash
npx @mui/codemod v5.0.0/date-pickers-moved-to-x <path>
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The `preset-safe` codemod will automatically adjust the bulk of your code to acc

You can either run it on a specific file, folder, or your entire codebase when choosing the `<path>` argument.

```sh
```bash
// Date and Time Pickers specific
npx @mui/x-codemod v6.0.0/pickers/preset-safe <path>
// Target Data Grid as well
Expand Down Expand Up @@ -958,7 +958,7 @@ To smooth the transition, pickers support both the `components` props which are

If you would like to use the new API and do not want to see deprecated prop usage, consider running `rename-components-to-slots` codemod handling the prop renaming.

```sh
```bash
npx @mui/x-codemod v6.0.0/pickers/rename-components-to-slots <path>
```

Expand Down
2 changes: 1 addition & 1 deletion docs/src/modules/components/InstallationInstructions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export default function InstallationInstructions(props: {
</TextField>
) : null}
</Stack>
<HighlightedCode sx={{ width: '100%' }} code={commands.join('\n')} language="sh" />
<HighlightedCode sx={{ width: '100%' }} code={commands.join('\n')} language="bash" />
</Stack>
);
}
2 changes: 1 addition & 1 deletion packages/grid/x-data-grid-premium/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ It's part of MUI X, an open core extension of MUI, with advanced components.

Install the package in your project directory with:

```sh
```bash
// with npm
npm install @mui/x-data-grid-premium

Expand Down
Loading

0 comments on commit 9b448a8

Please sign in to comment.