import React, { useState } from 'react';
import { Loading as LoadingComponent, Button } from '../../../src';
import { CodeBlock, ApiTable, ApiRow, sectionStyle, sectionTitleStyle, tagStyle, demoBodyStyle, labelStyle } from '../../tools';
const LoadingDemo: React.FC = () => {
const [active, setActive] = useState(true);
return (
Loading 加载动画
动森风格小岛 Loading 动画组件,带有漂浮的小岛、摇曳的树叶和游动的鱼。关闭时会从中间圆形透明扩散,露出底层内容。
底层内容 · Underlying Content
{
const [active, setActive] = useState(true);
return (
{/* 底层内容 */}
Underlying Content
{/* Loading 覆盖层,关闭时透明圆形扩散露出底层 */}
);
};`}
/>
);
};
const LOADING_API: ApiRow[] = [
{ prop: 'active', desc: '是否显示加载动画', type: 'boolean', defaultVal: 'true' },
{ prop: 'className', desc: '自定义类名', type: 'string', defaultVal: '-' },
{ prop: 'style', desc: '自定义样式', type: 'CSSProperties', defaultVal: '-' },
];
export default LoadingDemo;