UNPKG

polaris-glints

Version:

Glints forked polaris react

33 lines (30 loc) 982 B
import React from 'react'; import emptySearch from './illustrations/empty-search.svg.js'; import { Stack } from '../Stack/Stack.js'; import { Text } from '../Text/Text.js'; import { Image } from '../Image/Image.js'; function EmptySearchResult({ title, description, withIllustration }) { const altText = 'Empty search results'; const descriptionMarkup = description ? /*#__PURE__*/React.createElement("p", null, description) : null; const illustrationMarkup = withIllustration ? /*#__PURE__*/React.createElement(Image, { alt: altText, source: emptySearch, draggable: false }) : null; return /*#__PURE__*/React.createElement(Stack, { alignment: "center", vertical: true }, illustrationMarkup, /*#__PURE__*/React.createElement(Text, { variant: "headingLg", as: "p" }, title), /*#__PURE__*/React.createElement(Text, { variant: "bodyMd", color: "subdued", as: "span" }, descriptionMarkup)); } export { EmptySearchResult };