From d797dfc0ffeaec8ba2a6a6a62800164dee02f197 Mon Sep 17 00:00:00 2001 From: MadCcc <1075746765@qq.com> Date: Thu, 26 May 2022 23:33:46 +0800 Subject: [PATCH] docs: fix skeleton demo (#35760) --- components/skeleton/demo/list.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/skeleton/demo/list.md b/components/skeleton/demo/list.md index 267954994d..e8ad617b91 100644 --- a/components/skeleton/demo/list.md +++ b/components/skeleton/demo/list.md @@ -14,10 +14,10 @@ title: Use skeleton in list component. ```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 { LikeOutlined, MessageOutlined, StarOutlined } from '@ant-design/icons'; +import { Avatar, List, Skeleton, Switch } from 'antd'; +import React, { useState } from 'react'; interface IconTextProps { icon: typeof Icon; @@ -45,7 +45,7 @@ const App: React.FC = () => { const [loading, setLoading] = useState(true); const onChange = (checked: boolean) => { - setLoading(checked); + setLoading(!checked); }; return ( <>