UNPKG

947 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3var tslib_1 = require("tslib");
4/** @jsx jsx */
5var core_1 = require("@emotion/core");
6var utils_1 = require("./utils");
7var constants_1 = require("@kalamazoo/theme/constants");
8exports.default = (function (_a) {
9 var spacing = _a.spacing, icon = _a.icon, isOnlyChild = _a.isOnlyChild, isLoading = _a.isLoading, rest = tslib_1.__rest(_a, ["spacing", "icon", "isOnlyChild", "isLoading"]);
10 return (core_1.jsx("span", tslib_1.__assign({ css: tslib_1.__assign({ alignSelf: 'center', display: 'flex', flexShrink: 0, lineHeight: 0, fontSize: 0, userSelect: 'none', margin: spacing === 'none'
11 ? 0
12 : isOnlyChild
13 ? "0 -" + constants_1.gridSize() / 4 + "px"
14 : "0 " + constants_1.gridSize() / 2 + "px" }, utils_1.getLoadingStyle(isLoading)) }, rest), icon));
15});
16//# sourceMappingURL=IconWrapper.js.map
\No newline at end of file