ant-design/components/spin/demo/tip.tsx
afc163 db17128186
demo: fix Spin tip demo in SSR mode (#48688)
* demo: fix Spin tip demo in SSR mode

* Update components/spin/demo/tip.tsx

Co-authored-by: lijianan <574980606@qq.com>
Signed-off-by: afc163 <afc163@gmail.com>

---------

Signed-off-by: afc163 <afc163@gmail.com>
Co-authored-by: lijianan <574980606@qq.com>
2024-04-29 13:49:40 +08:00

34 lines
743 B
TypeScript

import React from 'react';
import { Alert, Flex, Spin } from 'antd';
const contentStyle: React.CSSProperties = {
padding: 50,
background: 'rgba(0, 0, 0, 0.05)',
borderRadius: 4,
};
const content = <div style={contentStyle} />;
const App: React.FC = () => (
<Flex gap="small" vertical>
<Flex gap="small">
<Spin tip="Loading" size="small">
{content}
</Spin>
<Spin tip="Loading">{content}</Spin>
<Spin tip="Loading" size="large">
{content}
</Spin>
</Flex>
<Spin tip="Loading...">
<Alert
message="Alert message title"
description="Further details about the context of this alert."
type="info"
/>
</Spin>
</Flex>
);
export default App;