Skip to content

[docs][Switch] Demo uses deprecated inputProps not slotProps.input in switches examples #46622

@konrazem

Description

@konrazem

Related page

https://mui.com/material-ui/react-switch/#controlled

Kind of issue

Other

Issue description

In documentation in exmple with controlled switches there is are deprecated props used.

Instead of

<Switch
      ...
      inputProps={{ 'aria-label': 'controlled' }}
    />

Should be

<Switch
      ...
      slotProps={{ input: { 'aria-label': 'controlled' } }}
    />

Maybe there are more such deprecations I didn't check all 😊

Context

No response

Search keywords: docs, switch, controlled, inputProps, slotProps

Metadata

Metadata

Assignees

Labels

component: switchThis is the name of the generic UI component, not the React module!docsImprovements or additions to the documentationgood first issueGreat for first contributions. Enable to learn the contribution process.support: docs-feedbackFeedback from documentation page

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions