Skip to content

Commit 0a3253e

Browse files
committed
Replace components with slots in all Joy demos
1 parent d759a9a commit 0a3253e

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ export default function GitHubLabel() {
131131
<Autocomplete
132132
open
133133
multiple
134-
components={{ listbox: Listbox }}
134+
slots={{ listbox: Listbox }}
135135
onClose={(event, reason) => {
136136
if (reason === 'escape') {
137137
handleClose();

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export default function Virtualize() {
117117
<Autocomplete
118118
sx={{ width: 300 }}
119119
disableListWrap
120-
components={{
120+
slots={{
121121
listbox: ListboxComponent,
122122
}}
123123
options={OPTIONS}

docs/data/joy/components/autocomplete/autocomplete.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@ Use the `component` prop to override the `root` slot with a custom element. For
100100

101101
### Overriding other slots
102102

103-
Use the `components` with keys (the target slots) and values (the custom elements). For example, the following code snippet replaces the default `<ul>` and `<li>` with `div`:
103+
Use the `slots` with keys (the target slots) and values (the custom elements). For example, the following code snippet replaces the default `<ul>` and `<li>` with `div`:
104104

105105
```js
106106
<Autocomplete
107-
components={{
107+
slots={{
108108
listbox: 'div',
109109
option: 'div',
110110
}}

0 commit comments

Comments
 (0)