mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 02:59:58 +08:00
docs: fix skeleton demo (#35760)
This commit is contained in:
parent
534abc3ad3
commit
d797dfc0ff
@ -14,10 +14,10 @@ title:
|
|||||||
Use skeleton in list component.
|
Use skeleton in list component.
|
||||||
|
|
||||||
```tsx
|
```tsx
|
||||||
import React, { useState } from 'react';
|
|
||||||
import { Skeleton, Switch, List, Avatar } from 'antd';
|
|
||||||
import { StarOutlined, LikeOutlined, MessageOutlined } from '@ant-design/icons';
|
|
||||||
import type Icon from '@ant-design/icons';
|
import type Icon from '@ant-design/icons';
|
||||||
|
import { LikeOutlined, MessageOutlined, StarOutlined } from '@ant-design/icons';
|
||||||
|
import { Avatar, List, Skeleton, Switch } from 'antd';
|
||||||
|
import React, { useState } from 'react';
|
||||||
|
|
||||||
interface IconTextProps {
|
interface IconTextProps {
|
||||||
icon: typeof Icon;
|
icon: typeof Icon;
|
||||||
@ -45,7 +45,7 @@ const App: React.FC = () => {
|
|||||||
const [loading, setLoading] = useState(true);
|
const [loading, setLoading] = useState(true);
|
||||||
|
|
||||||
const onChange = (checked: boolean) => {
|
const onChange = (checked: boolean) => {
|
||||||
setLoading(checked);
|
setLoading(!checked);
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
Loading…
Reference in New Issue
Block a user