Skip to content

Commit dd57ab7

Browse files
[docs] Replace deprecated inputProps with slotProps.input in checkbox demos (#47083)
Co-authored-by: ZeeshanTamboli <[email protected]>
1 parent 90a0273 commit dd57ab7

14 files changed

+22
-16
lines changed

docs/data/material/components/checkboxes/Checkboxes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import Checkbox from '@mui/material/Checkbox';
33

4-
const label = { inputProps: { 'aria-label': 'Checkbox demo' } };
4+
const label = { slotProps: { input: { 'aria-label': 'Checkbox demo' } } };
55

66
export default function Checkboxes() {
77
return (

docs/data/material/components/checkboxes/Checkboxes.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import Checkbox from '@mui/material/Checkbox';
33

4-
const label = { inputProps: { 'aria-label': 'Checkbox demo' } };
4+
const label = { slotProps: { input: { 'aria-label': 'Checkbox demo' } } };
55

66
export default function Checkboxes() {
77
return (

docs/data/material/components/checkboxes/ColorCheckboxes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as React from 'react';
22
import { pink } from '@mui/material/colors';
33
import Checkbox from '@mui/material/Checkbox';
44

5-
const label = { inputProps: { 'aria-label': 'Checkbox demo' } };
5+
const label = { slotProps: { input: { 'aria-label': 'Checkbox demo' } } };
66

77
export default function ColorCheckboxes() {
88
return (

docs/data/material/components/checkboxes/ColorCheckboxes.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as React from 'react';
22
import { pink } from '@mui/material/colors';
33
import Checkbox from '@mui/material/Checkbox';
44

5-
const label = { inputProps: { 'aria-label': 'Checkbox demo' } };
5+
const label = { slotProps: { input: { 'aria-label': 'Checkbox demo' } } };
66

77
export default function ColorCheckboxes() {
88
return (

docs/data/material/components/checkboxes/ControlledCheckbox.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ export default function ControlledCheckbox() {
1212
<Checkbox
1313
checked={checked}
1414
onChange={handleChange}
15-
inputProps={{ 'aria-label': 'controlled' }}
15+
slotProps={{
16+
input: { 'aria-label': 'controlled' },
17+
}}
1618
/>
1719
);
1820
}

docs/data/material/components/checkboxes/ControlledCheckbox.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ export default function ControlledCheckbox() {
1212
<Checkbox
1313
checked={checked}
1414
onChange={handleChange}
15-
inputProps={{ 'aria-label': 'controlled' }}
15+
slotProps={{
16+
input: { 'aria-label': 'controlled' },
17+
}}
1618
/>
1719
);
1820
}
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<Checkbox
22
checked={checked}
33
onChange={handleChange}
4-
inputProps={{ 'aria-label': 'controlled' }}
4+
slotProps={{
5+
input: { 'aria-label': 'controlled' },
6+
}}
57
/>

docs/data/material/components/checkboxes/CustomizedCheckbox.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ function BpCheckbox(props) {
6060
color="default"
6161
checkedIcon={<BpCheckedIcon />}
6262
icon={<BpIcon />}
63-
inputProps={{ 'aria-label': 'Checkbox demo' }}
63+
slotProps={{ input: { 'aria-label': 'Checkbox demo' } }}
6464
{...props}
6565
/>
6666
);

docs/data/material/components/checkboxes/CustomizedCheckbox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ function BpCheckbox(props: CheckboxProps) {
6060
color="default"
6161
checkedIcon={<BpCheckedIcon />}
6262
icon={<BpIcon />}
63-
inputProps={{ 'aria-label': 'Checkbox demo' }}
63+
slotProps={{ input: { 'aria-label': 'Checkbox demo' } }}
6464
{...props}
6565
/>
6666
);

docs/data/material/components/checkboxes/IconCheckboxes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import Favorite from '@mui/icons-material/Favorite';
55
import BookmarkBorderIcon from '@mui/icons-material/BookmarkBorder';
66
import BookmarkIcon from '@mui/icons-material/Bookmark';
77

8-
const label = { inputProps: { 'aria-label': 'Checkbox demo' } };
8+
const label = { slotProps: { input: { 'aria-label': 'Checkbox demo' } } };
99

1010
export default function IconCheckboxes() {
1111
return (

0 commit comments

Comments
 (0)