mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-04 08:59:40 +08:00
99faed814a
Signed-off-by: lijianan <574980606@qq.com>
24 lines
575 B
TypeScript
24 lines
575 B
TypeScript
import React from 'react';
|
||
import { Alert, Spin, Switch } from 'antd';
|
||
|
||
const App: React.FC = () => {
|
||
const [loading, setLoading] = React.useState<boolean>(false);
|
||
return (
|
||
<>
|
||
<Spin spinning={loading} delay={500}>
|
||
<Alert
|
||
type="info"
|
||
message="Alert message title"
|
||
description="Further details about the context of this alert."
|
||
/>
|
||
</Spin>
|
||
<div style={{ marginTop: 16 }}>
|
||
Loading state:
|
||
<Switch checked={loading} onChange={setLoading} />
|
||
</div>
|
||
</>
|
||
);
|
||
};
|
||
|
||
export default App;
|