Skip to content

Commit 20339c8

Browse files
authored
docs(examples): replace deprecated children prop of ListItemStandard (#7317)
1 parent 69d9fbc commit 20339c8

File tree

7 files changed

+26
-21
lines changed

7 files changed

+26
-21
lines changed

examples/nextjs-app/app/components/AppShellBar.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,12 @@ export function AppShellBar() {
7171
>
7272
<List onSelectionChange={handleThemeSwitch} headerText="Change Theme" selectionMode={ListMode.Single}>
7373
{THEMES.map((theme) => (
74-
<ListItemStandard key={theme.key} selected={currentTheme === theme.key} data-key={theme.key}>
75-
{theme.value}
76-
</ListItemStandard>
74+
<ListItemStandard
75+
key={theme.key}
76+
selected={currentTheme === theme.key}
77+
data-key={theme.key}
78+
text={theme.value}
79+
/>
7780
))}
7881
</List>
7982
</ResponsivePopover>

examples/nextjs-app/app/components/TodoList.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@ export function TodoList({ items }: TodoListProps) {
2626
type={ListItemType.Navigation}
2727
additionalText={`${!todo.completed ? 'Not ' : ''}Completed`}
2828
additionalTextState={todo.completed ? ValueState.Positive : ValueState.None}
29-
>
30-
{todo.title}
31-
</ListItemStandard>
29+
text={todo.title}
30+
/>
3231
);
3332
})}
3433
</List>

examples/nextjs-pages/pages/index.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,8 @@ export default function Home({ todos }: Props) {
3434
type={ListItemType.Navigation}
3535
additionalText={`${!todo.completed ? 'Not ' : ''}Completed`}
3636
additionalTextState={todo.completed ? ValueState.Positive : ValueState.None}
37-
>
38-
{todo.title}
39-
</ListItemStandard>
37+
text={todo.title}
38+
/>
4039
);
4140
})}
4241
</List>

examples/react-router-ts/app/components/AppShellBar.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,12 @@ export function AppShellBar() {
6363
<ResponsivePopover ref={popoverRef} className={classes.popover}>
6464
<List onSelectionChange={handleThemeSwitch} headerText="Change Theme" selectionMode={ListSelectionMode.Single}>
6565
{THEMES.map((theme) => (
66-
<ListItemStandard key={theme.key} selected={currentTheme === theme.key} data-key={theme.key}>
67-
{theme.value}
68-
</ListItemStandard>
66+
<ListItemStandard
67+
key={theme.key}
68+
selected={currentTheme === theme.key}
69+
data-key={theme.key}
70+
text={theme.value}
71+
/>
6972
))}
7073
</List>
7174
</ResponsivePopover>

examples/react-router-ts/app/components/TodoList.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ export function TodoList({ items }: TodoListProps) {
2424
type={ListItemType.Navigation}
2525
additionalText={`${!todo.completed ? 'Not ' : ''}Completed`}
2626
additionalTextState={todo.completed ? ValueState.Positive : ValueState.None}
27-
>
28-
{todo.title}
29-
</ListItemStandard>
27+
text={todo.title}
28+
/>
3029
);
3130
})}
3231
</List>

examples/vite-ts/src/AppShell.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,12 @@ function AppShell() {
100100
>
101101
<List onSelectionChange={handleThemeSwitch} headerText="Change Theme" selectionMode={ListMode.Single}>
102102
{THEMES.map((theme) => (
103-
<ListItemStandard key={theme.key} selected={currentTheme === theme.key} data-key={theme.key}>
104-
{theme.value}
105-
</ListItemStandard>
103+
<ListItemStandard
104+
key={theme.key}
105+
selected={currentTheme === theme.key}
106+
data-key={theme.key}
107+
text={theme.value}
108+
/>
106109
))}
107110
</List>
108111
</ResponsivePopover>

examples/vite-ts/src/ToDos.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,8 @@ function ToDos() {
3131
type={ListItemType.Navigation}
3232
additionalText={`${!todo.completed ? 'Not ' : ''}Completed`}
3333
additionalTextState={todo.completed ? ValueState.Positive : ValueState.None}
34-
>
35-
{todo.title}
36-
</ListItemStandard>
34+
text={todo.title}
35+
/>
3736
);
3837
})}
3938
</List>

0 commit comments

Comments
 (0)