function SearchResults()

in theme/src/components/search-results.js [6:39]


function SearchResults({results, getItemProps, highlightedIndex}) {
  const siteMetadata = useSiteMetadata()

  if (results.length === 0) {
    return (
      <Box p={3} fontSize={1} color="fg.muted" width="100%">
        No results
      </Box>
    )
  }

  return results.map((item, index) => (
    <Flex
      key={item.path}
      {...getItemProps({
        item,
        flexDirection: 'column',
        flex: '0 0 auto',
        px: 2,
        py: 2,
        color: 'fg.default',
        fontSize: 1,
        bg: highlightedIndex === index ? 'neutral.muted' : 'transparent',
        style: {cursor: 'pointer'},
        borderRadius: 2
      })}
    >
      <Text fontSize={0} color="fg.muted">
        {getBreadcrumbs(siteMetadata.shortName, item.path).join(' / ')}
      </Text>
      {item.title}
    </Flex>
  ))
}