mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-16 01:29:11 +08:00
db17128186
* 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>
34 lines
743 B
TypeScript
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;
|