ant-design/components/spin/demo/nested.tsx
lijianan 99faed814a
demo: update Spin demo layout to Flex Component (#45577)
Signed-off-by: lijianan <574980606@qq.com>
2023-11-01 22:26:02 +08:00

24 lines
563 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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}>
<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;