Skip to content

Commit 35ef3cd

Browse files
committed
Improve stories and examples code.
1 parent 59808d1 commit 35ef3cd

File tree

1 file changed

+31
-33
lines changed

1 file changed

+31
-33
lines changed

packages/ra-core/src/controller/list/RecordsIterator.stories.tsx

Lines changed: 31 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -37,27 +37,26 @@ export const UsingRender = ({
3737
<WithListContext
3838
loading={<div>Loading...</div>}
3939
empty={<div>No data</div>}
40-
render={() => (
41-
<ul
42-
style={{
43-
listStyleType: 'none',
44-
}}
45-
>
46-
<RecordsIterator
47-
render={record => (
48-
<li
49-
style={{
50-
padding: '10px',
51-
border: '1px solid #ccc',
52-
}}
53-
>
54-
{record.title}
55-
</li>
56-
)}
57-
/>
58-
</ul>
59-
)}
60-
/>
40+
>
41+
<ul
42+
style={{
43+
listStyleType: 'none',
44+
}}
45+
>
46+
<RecordsIterator
47+
render={record => (
48+
<li
49+
style={{
50+
padding: '10px',
51+
border: '1px solid #ccc',
52+
}}
53+
>
54+
{record.title}
55+
</li>
56+
)}
57+
/>
58+
</ul>
59+
</WithListContext>
6160
</ListContextProvider>
6261
);
6362
};
@@ -101,18 +100,17 @@ export const UsingChildren = ({
101100
<WithListContext
102101
loading={<div>Loading...</div>}
103102
empty={<div>No data</div>}
104-
render={() => (
105-
<ul
106-
style={{
107-
listStyleType: 'none',
108-
}}
109-
>
110-
<RecordsIterator>
111-
<ListItem />
112-
</RecordsIterator>
113-
</ul>
114-
)}
115-
/>
103+
>
104+
<ul
105+
style={{
106+
listStyleType: 'none',
107+
}}
108+
>
109+
<RecordsIterator>
110+
<ListItem />
111+
</RecordsIterator>
112+
</ul>
113+
</WithListContext>
116114
</ListContextProvider>
117115
);
118116
};

0 commit comments

Comments
 (0)