import { GithubIcon, theme } from '@expo/styleguide'; import { Command } from 'cmdk'; import type { RNDirectoryItemType } from '../types'; import { addHighlight, openLink } from '../utils'; import { ExternalLinkIcon } from './icons'; import { footnoteStyle, itemStyle } from './styles'; import { CALLOUT, FOOTNOTE } from '~/ui/components/Text'; type Props = { item: RNDirectoryItemType; query: string; onSelect?: () => void; }; const numberFormat = new Intl.NumberFormat(); export const RNDirectoryItem = ({ item, onSelect, query }: Props) => { return ( { openLink(item.githubUrl, true); onSelect && onSelect(); }}>
{numberFormat.format(item.github.stats.stars)} stars ยท{' '} {numberFormat.format(item.npm.downloads)} downloads
); };