UNPKG

1.1 kBJavaScriptView Raw
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.default = void 0;
7
8var _preact = require("preact");
9
10var _ = require("./");
11
12var _default = ({
13 status,
14 term
15}) => {
16 if (status === 'noResults') {
17 return (0, _preact.h)("span", {
18 className: "flex items-center mv1"
19 }, (0, _preact.h)(_.Icon, {
20 className: "f3 mr2",
21 size: "18",
22 icon: "warning"
23 }), (0, _preact.h)("span", null, "No results for \"", term, "\""));
24 }
25
26 if (status === 'searching') {
27 return (0, _preact.h)("span", {
28 className: "flex items-center mv1"
29 }, (0, _preact.h)(_.Icon, {
30 className: "f3 spin-animation mr2",
31 size: "18",
32 icon: "autorenew"
33 }), (0, _preact.h)("span", null, "Searching"));
34 }
35
36 if (status === 'ready') {
37 return (0, _preact.h)("span", {
38 className: "flex items-center mv1"
39 }, (0, _preact.h)(_.Icon, {
40 className: "f3 mr2",
41 size: "18",
42 icon: "info"
43 }), (0, _preact.h)("span", null, "Suggestions will appear here"));
44 }
45
46 return null;
47};
48
49exports.default = _default;
\No newline at end of file