mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-29 11:58:31 +08:00
24 lines
569 B
TypeScript
24 lines
569 B
TypeScript
import React from 'react';
|
||
import { Alert, Flex, Spin, Switch } from 'antd';
|
||
|
||
const App: React.FC = () => {
|
||
const [loading, setLoading] = React.useState<boolean>(false);
|
||
return (
|
||
<Flex gap="middle" vertical>
|
||
<Spin spinning={loading}>
|
||
<Alert
|
||
type="info"
|
||
message="Alert message title"
|
||
description="Further details about the context of this alert."
|
||
/>
|
||
</Spin>
|
||
<p>
|
||
Loading state:
|
||
<Switch checked={loading} onChange={setLoading} />
|
||
</p>
|
||
</Flex>
|
||
);
|
||
};
|
||
|
||
export default App;
|