import React from 'react' import * as LucideIcons from '@tamagui/lucide-icons-2' import { ScrollView } from 'react-native' import { Input, Paragraph, Spacer, YStack, useDebounceValue } from 'tamagui' import { Grid } from './Grid' const lucideIcons = Object.keys( // vite tree shaking workaround typeof LucideIcons !== 'undefined' ? LucideIcons : {} ).map((name) => ({ key: name.toLowerCase(), name, Icon: LucideIcons[name], })) export function LucideIconsDemo() { const [searchRaw, setSearch] = React.useState('') const search = useDebounceValue(searchRaw, 400) const size = 100 const iconsMemo = React.useMemo( () => lucideIcons .filter((x) => x.key.includes(search.toLowerCase())) .map(({ Icon, name }) => ( {name} )), [search] ) return ( {iconsMemo} ) }