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; text: React.ReactNode; } const listData = Array.from({ length: 3 }).map((_, i) => ({ href: 'https://ant.design', title: `ant design part ${i + 1}`, avatar: `https://xsgames.co/randomusers/avatar.php?g=pixel&key=${i}`, description: 'Ant Design, a design language for background applications, is refined by Ant UED Team.', content: '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.', })); const IconText: React.FC = ({ icon, text }) => ( <> {React.createElement(icon, { style: { marginRight: 8 } })} {text} ); const App: React.FC = () => { const [loading, setLoading] = useState(true); const onChange = (checked: boolean) => { setLoading(!checked); }; return ( <> ( , , , ] : undefined } extra={ !loading && ( logo ) } > } title={{item.title}} description={item.description} /> {item.content} )} /> ); }; export default App;