[docs] Fix incorrect parameter name in date pickers custom components documentation from variant to pickerVariant #18919
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix incorrect parameter name in date pickers custom components documentation from
variant
topickerVariant
Problem
The documentation in
docs/data/date-pickers/custom-components/custom-components.md
shows an incorrect parameter name in theactionBar
slotProps example. The example usesvariant
but the actualPickerOwnerState
interface defines the property aspickerVariant
.Current (incorrect) documentation:
Source: https://mui.com/x/react-date-pickers/custom-components/#component-props
Actual interface definition:
Source: https://github.com/mui/mui-x/blob/master/packages/x-date-pickers/src/models/pickers.ts#L56
Solution
Update the documentation example to use the correct parameter name
pickerVariant
instead ofvariant
.Fixed documentation:
Impact
This fix ensures developers using the slotProps API get the correct parameter name, preventing runtime/linter errors and improving developer experience.