From 6e21fb6e34dbf60f01c24b089c4e2d4c19758647 Mon Sep 17 00:00:00 2001 From: Flavien DELANGLE Date: Wed, 20 Nov 2024 19:15:28 +0100 Subject: [PATCH] [docs] Fix typo in migration guide (#15508) Signed-off-by: Flavien DELANGLE Co-authored-by: Lukas Tyla --- .../migration-pickers-v7.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/data/migration/migration-pickers-v7/migration-pickers-v7.md b/docs/data/migration/migration-pickers-v7/migration-pickers-v7.md index 7b87e8d9ce777..5ab0f1392e684 100644 --- a/docs/data/migration/migration-pickers-v7/migration-pickers-v7.md +++ b/docs/data/migration/migration-pickers-v7/migration-pickers-v7.md @@ -258,41 +258,41 @@ const theme = createTheme({ ### Slot: `layout` -- The component passed to the `layout` slot no longer receives a `disabled` prop, instead you can use the `usePickersContext` hook: +- The component passed to the `layout` slot no longer receives a `disabled` prop, instead you can use the `usePickerContext` hook: ```diff -console.log(props.disabled); - +import { usePickersContext } from '@mui/x-date-pickers/hooks'; - +const { disabled } = usePickersContext(); + +import { usePickerContext } from '@mui/x-date-pickers/hooks'; + +const { disabled } = usePickerContext(); +console.log(disabled); ``` -- The component passed to the `layout` slot no longer receives a `readOnly` prop, instead you can use the `usePickersContext` hook: +- The component passed to the `layout` slot no longer receives a `readOnly` prop, instead you can use the `usePickerContext` hook: ```diff -console.log(props.readOnly); - +import { usePickersContext } from '@mui/x-date-pickers/hooks'; - +const { readOnly } = usePickersContext(); + +import { usePickerContext } from '@mui/x-date-pickers/hooks'; + +const { readOnly } = usePickerContext(); +console.log(readOnly); ``` ### Slot: `toolbar` -- The component passed to the `toolbar` slot no longer receives a `disabled` prop, instead you can use the `usePickersContext` hook: +- The component passed to the `toolbar` slot no longer receives a `disabled` prop, instead you can use the `usePickerContext` hook: ```diff -console.log(props.disabled); - +import { usePickersContext } from '@mui/x-date-pickers/hooks'; - +const { disabled } = usePickersContext(); + +import { usePickerContext } from '@mui/x-date-pickers/hooks'; + +const { disabled } = usePickerContext(); +console.log(disabled); ``` -- The component passed to the `toolbar` slot no longer receives a `readOnly` prop, instead you can use the `usePickersContext` hook: +- The component passed to the `toolbar` slot no longer receives a `readOnly` prop, instead you can use the `usePickerContext` hook: ```diff -console.log(props.readOnly); - +import { usePickersContext } from '@mui/x-date-pickers/hooks'; - +const { readOnly } = usePickersContext(); + +import { usePickerContext } from '@mui/x-date-pickers/hooks'; + +const { readOnly } = usePickerContext(); +console.log(readOnly); ```