mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-15 17:31:25 +08:00
35 lines
847 B
TypeScript
35 lines
847 B
TypeScript
|
import React, { useState } from 'react';
|
||
|
import { Button, Skeleton } from 'antd';
|
||
|
|
||
|
const App: React.FC = () => {
|
||
|
const [loading, setLoading] = useState(false);
|
||
|
|
||
|
const showSkeleton = () => {
|
||
|
setLoading(true);
|
||
|
|
||
|
setTimeout(() => {
|
||
|
setLoading(false);
|
||
|
}, 3000);
|
||
|
};
|
||
|
|
||
|
return (
|
||
|
<div className="article">
|
||
|
<Skeleton loading={loading}>
|
||
|
<div>
|
||
|
<h4>Ant Design, a design language</h4>
|
||
|
<p>
|
||
|
We supply a series of design principles, practical patterns and high quality design
|
||
|
resources (Sketch and Axure), to help people create their product prototypes beautifully
|
||
|
and efficiently.
|
||
|
</p>
|
||
|
</div>
|
||
|
</Skeleton>
|
||
|
<Button onClick={showSkeleton} disabled={loading}>
|
||
|
Show Skeleton
|
||
|
</Button>
|
||
|
</div>
|
||
|
);
|
||
|
};
|
||
|
|
||
|
export default App;
|