import React, { useState } from 'react' import * as Icons from '../' import { IconProps } from '../' import './App.css' const sizes: IconProps['size'][] = [ 'xs', 'sm', 'fw', 'lx', '1x', 'lg', '2x', '3x', '4x', '5x', '6x', '7x', '8x', '9x', '10x', ] const App = () => { const [search, setSearch] = useState('') return (
setSearch(e.target.value)} /> {Object.entries(Icons) .filter(([name]) => name.toLowerCase().includes(search.toLowerCase())) .flatMap(([name, Icon]) => (
{sizes.map(size => ( ))}
))}
) } export default App