mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-07 09:26:06 +08:00
fix: demos suspence block (#52051)
This commit is contained in:
parent
4a354188e5
commit
4fcf3da852
@ -2,7 +2,7 @@ import React, { Suspense, useContext } from 'react';
|
||||
import { BugOutlined, CodeOutlined, ExperimentOutlined } from '@ant-design/icons';
|
||||
import { ConfigProvider, Tooltip, Button } from 'antd';
|
||||
import classNames from 'classnames';
|
||||
import { DumiDemoGrid, FormattedMessage } from 'dumi';
|
||||
import { DumiDemoGrid, FormattedMessage, DumiDemo } from 'dumi';
|
||||
import { css, Global } from '@emotion/react';
|
||||
|
||||
import useLayoutState from '../../../hooks/useLayoutState';
|
||||
@ -114,7 +114,14 @@ const DemoWrapper: typeof DumiDemoGrid = ({ items }) => {
|
||||
</span>
|
||||
<ConfigProvider theme={{ cssVar: enableCssVar, hashed: !enableCssVar }}>
|
||||
<Suspense>
|
||||
<DumiDemoGrid items={demos} />
|
||||
<DumiDemoGrid
|
||||
items={demos}
|
||||
demoRender={(item) => (
|
||||
<Suspense>
|
||||
<DumiDemo key={item.demo.id} {...item} />
|
||||
</Suspense>
|
||||
)}
|
||||
/>
|
||||
</Suspense>
|
||||
</ConfigProvider>
|
||||
</div>
|
||||
|
@ -230,7 +230,7 @@
|
||||
"cross-fetch": "^4.0.0",
|
||||
"dekko": "^0.2.1",
|
||||
"dotenv": "^16.4.5",
|
||||
"dumi": "~2.4.16",
|
||||
"dumi": "~2.4.17",
|
||||
"dumi-plugin-color-chunk": "^1.1.2",
|
||||
"eslint": "^9.13.0",
|
||||
"eslint-plugin-compat": "^6.0.1",
|
||||
|
Loading…
Reference in New Issue
Block a user