import { UserOutlined } from '@ant-design/icons'; import { AutoComplete, Input } from 'antd'; import React from 'react'; const renderTitle = (title: string) => ( {title} more ); const renderItem = (title: string, count: number) => ({ value: title, label: (
{title} {count}
), }); const options = [ { label: renderTitle('Libraries'), options: [renderItem('AntDesign', 10000), renderItem('AntDesign UI', 10600)], }, { label: renderTitle('Solutions'), options: [renderItem('AntDesign UI FAQ', 60100), renderItem('AntDesign FAQ', 30010)], }, { label: renderTitle('Articles'), options: [renderItem('AntDesign design language', 100000)], }, ]; const App: React.FC = () => ( ); export default App;