UNPKG

phx-react

Version:

PHX REACT

16 lines 1.42 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const solid_1 = require("@heroicons/react/20/solid"); const react_1 = tslib_1.__importDefault(require("react")); const types_1 = require("../../types"); const Loading_1 = require("../../Loading"); function SearchResult({ setQuery, type, loading, actionSelectAll }) { return (react_1.default.createElement(react_1.default.Fragment, null, react_1.default.createElement("input", { className: (0, types_1.classNames)(loading && 'pr-10', 'block w-full rounded-lg border-[0.5px] border-gray-500 px-3 py-1.5 pl-8 text-xs font-normal shadow-sm hover:bg-gray-50 focus:border-gray-500 focus:bg-gray-50 focus:outline-none focus:outline-offset-1 focus:outline-indigo-500 focus:ring-transparent'), onChange: (e) => setQuery(e.target.value), placeholder: 'T\u00ECm ki\u1EBFm', type: 'text' }), react_1.default.createElement(solid_1.MagnifyingGlassIcon, { className: (0, types_1.classNames)('h-4 w-4 text-gray-500 absolute ml-3', type === 'have-bulk-actions' ? 'top-5' : 'top-2') }), loading && (react_1.default.createElement("div", { className: (0, types_1.classNames)('absolute mt-0.5', actionSelectAll ? 'right-6 top-4' : 'right-2 top-1') }, react_1.default.createElement(Loading_1.PHXSpinner, null))))); } exports.default = SearchResult; //# sourceMappingURL=searchResult.js.map