| 1 |
"use strict"; |
| 2 |
Object.defineProperty(exports, "__esModule", { value: true }); |
| 3 |
exports.EmptyStateIcon = void 0; |
| 4 |
const tslib_1 = require("tslib"); |
| 5 |
const jsx_runtime_1 = require("react/jsx-runtime"); |
| 6 |
const react_styles_1 = require("@patternfly/react-styles"); |
| 7 |
const empty_state_1 = tslib_1.__importDefault(require("@patternfly/react-styles/css/components/EmptyState/empty-state")); |
| 8 |
const Spinner_1 = require("../Spinner"); |
| 9 |
const isSpinner = (icon) => icon.type === Spinner_1.Spinner; |
| 10 |
const EmptyStateIcon = (_a) => { |
| 11 |
var { className, icon: IconComponent } = _a, props = tslib_1.__rest(_a, ["className", "icon"]); |
| 12 |
const iconIsSpinner = isSpinner((0, jsx_runtime_1.jsx)(IconComponent, {})); |
| 13 |
return ((0, jsx_runtime_1.jsx)("div", { className: (0, react_styles_1.css)(empty_state_1.default.emptyStateIcon), children: (0, jsx_runtime_1.jsx)(IconComponent, Object.assign({ className: className, "aria-hidden": !iconIsSpinner }, props)) })); |
| 14 |
}; |
| 15 |
exports.EmptyStateIcon = EmptyStateIcon; |
| 16 |
exports.EmptyStateIcon.displayName = 'EmptyStateIcon'; |
| 17 |
//# sourceMappingURL=EmptyStateIcon.js.map |