import type { AlgoliaItemType } from '../types'; import { getContentHighlightHTML, getHighlightHTML } from '../utils'; import { CommandItemBase } from './CommandItemBase'; import { FootnoteSection } from './FootnoteSection'; import { ExternalLinkIcon, ReactIcon } from './icons'; import { CALLOUT, CAPTION, FOOTNOTE } from '~/ui/components/Text'; type Props = { item: AlgoliaItemType; onSelect?: () => void; }; export const RNDocsItem = ({ item, onSelect }: Props) => { const { lvl0, lvl1, lvl2, lvl3, lvl4 } = item.hierarchy; return (
{lvl4 && ( <> )} {!lvl4 && lvl3 && ( <> )} {!lvl3 && lvl2 && ( <> )} {!lvl3 && !lvl2 && lvl1 && ( <> )} {!lvl3 && !lvl2 && !lvl1 && lvl0 && ( )}
); };