Skip to content

Commit d759a9a

Browse files
committed
Replace componentsProps with slotProps in all Joy demos
1 parent 25a8a11 commit d759a9a

40 files changed

+51
-51
lines changed

docs/data/joy/components/autocomplete/CountrySelect.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default function CountrySelect() {
3737
<Input
3838
{...params}
3939
placeholder="Choose a country"
40-
componentsProps={{
40+
slotProps={{
4141
input: {
4242
...params.componentsProps.input,
4343
autoComplete: 'new-password', // disable autocomplete and autofill

docs/data/joy/components/checkbox/ExampleButtonCheckbox.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export default function ExampleButtonCheckbox() {
5353
setValue((val) => val.filter((text) => text !== item));
5454
}
5555
}}
56-
componentsProps={{
56+
slotProps={{
5757
action: ({ checked }) => ({
5858
sx: {
5959
bgcolor: checked ? 'background.surface' : 'transparent',

docs/data/joy/components/checkbox/ExampleChoiceChipCheckbox.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export default function ExampleChoiceChipCheckbox() {
4949
setValue((val) => val.filter((text) => text !== item));
5050
}
5151
}}
52-
componentsProps={{
52+
slotProps={{
5353
action: ({ checked }) => ({
5454
sx: checked
5555
? {

docs/data/joy/components/checkbox/FocusCheckbox.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ export default function FocusCheckbox() {
99
label="Label"
1010
defaultChecked
1111
// to demonstrate the focus outline
12-
componentsProps={{ action: { className: checkboxClasses.focusVisible } }}
12+
slotProps={{ action: { className: checkboxClasses.focusVisible } }}
1313
/>
1414
<Checkbox
1515
label="Label"
1616
defaultChecked
1717
sx={{ [`& > .${checkboxClasses.checkbox}`]: { position: 'relative' } }}
1818
// to demonstrate the focus outline
19-
componentsProps={{ action: { className: checkboxClasses.focusVisible } }}
19+
slotProps={{ action: { className: checkboxClasses.focusVisible } }}
2020
/>
2121
</Box>
2222
);

docs/data/joy/components/checkbox/HoverCheckbox.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default function HoverCheckbox() {
77
<Checkbox
88
uncheckedIcon={<Done />}
99
label="Label"
10-
componentsProps={{
10+
slotProps={{
1111
root: ({ checked, focusVisible }) => ({
1212
sx: !checked
1313
? {

docs/data/joy/components/checkbox/OverlayCheckbox.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default function OverlayCheckbox() {
2222
label="Focus outline covers the parent!"
2323
overlay
2424
// Force the outline to appear in the demo. Usually, you don't need this in your project.
25-
componentsProps={{ action: { className: checkboxClasses.focusVisible } }}
25+
slotProps={{ action: { className: checkboxClasses.focusVisible } }}
2626
/>
2727
</Sheet>
2828
</Box>

docs/data/joy/components/chip/LinkChip.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Chip from '@mui/joy/Chip';
33

44
export default function ClickableChip() {
55
return (
6-
<Chip componentsProps={{ action: { component: 'a', href: '#as-link' } }}>
6+
<Chip slotProps={{ action: { component: 'a', href: '#as-link' } }}>
77
Anchor chip
88
</Chip>
99
);

docs/data/joy/components/chip/LinkChip.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Chip from '@mui/joy/Chip';
33

44
export default function ClickableChip() {
55
return (
6-
<Chip componentsProps={{ action: { component: 'a', href: '#as-link' } }}>
6+
<Chip slotProps={{ action: { component: 'a', href: '#as-link' } }}>
77
Anchor chip
88
</Chip>
99
);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
<Chip componentsProps={{ action: { component: 'a', href: '#as-link' } }}>
1+
<Chip slotProps={{ action: { component: 'a', href: '#as-link' } }}>
22
Anchor chip
33
</Chip>

docs/data/joy/components/menu/MenuIconSideNavExample.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ function MenuButton({ children, menu, open, onOpen, onLeaveMenu, label, ...props
8989
actions: menuActions,
9090
anchorEl: buttonRef.current,
9191
modifiers,
92-
componentsProps: {
92+
slotProps: {
9393
listbox: {
9494
id: `nav-example-menu-${label}`,
9595
'aria-label': label,

0 commit comments

Comments
 (0)