MCPcopy Create free account
hub / github.com/adobe/react-spectrum / SearchEmptyState

Function SearchEmptyState

packages/dev/s2-docs/src/searchUtils.tsx:747–768  ·  view source on GitHub ↗
({
  searchValue,
  libraryLabel
}: {
  searchValue: string;
  libraryLabel: string;
})

Source from the content-addressed store, hash-verified

745}
746
747export function SearchEmptyState({
748 searchValue,
749 libraryLabel
750}: {
751 searchValue: string;
752 libraryLabel: string;
753}) {
754 return (
755 <IllustratedMessage styles={style({margin: 32})}>
756 <NoSearchResults />
757 <Heading>No results</Heading>
758 {searchValue.trim().length > 0 ? (
759 <Content>
760 No results found for{' '}
761 <strong className={style({fontWeight: 'bold'})}>{searchValue}</strong> in {libraryLabel}.
762 </Content>
763 ) : (
764 <Content>No results found in {libraryLabel}.</Content>
765 )}
766 </IllustratedMessage>
767 );
768}
769
770export const LazyIconSearchView = React.lazy(() =>
771 import('./IconSearchView').then(({IconSearchView}) => ({default: IconSearchView}))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected