UNPKG

@gechiui/components

Version:
35 lines (30 loc) 783 B
import { createElement } from "@gechiui/element"; /** * External dependencies */ import { filter } from 'lodash'; /** * GeChiUI dependencies */ import { __ } from '@gechiui/i18n'; /** * Internal dependencies */ import { useNavigationContext } from '../context'; import { ItemBaseUI, ItemUI } from '../styles/navigation-styles'; export default function NavigationSearchNoResultsFound(_ref) { let { search } = _ref; const { navigationTree: { items } } = useNavigationContext(); const resultsCount = filter(items, '_isVisible').length; if (!search || !!resultsCount) { return null; } return createElement(ItemBaseUI, null, createElement(ItemUI, null, __('未找到结果。'), " ")); } //# sourceMappingURL=search-no-results-found.js.map