@cap3/capitano-components
Version:
# <div style="color: crimson;">ALPHA DISCLAIMER</div>
26 lines • 1.1 kB
JavaScript
;
var __rest = (this && this.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
t[p[i]] = s[p[i]];
return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
const React = require("react");
const capitano_theme_1 = require("@cap3/capitano-theme");
const IconContainer = capitano_theme_1.styled("svg")(({ color }) => ({
color,
}));
/**
* Icon component for custom Icons provided as svg sprite with an id
* coloring should be done via currentcolor
*/
exports.Icon = (_a) => {
var { name, size = "20", iconId } = _a, props = __rest(_a, ["name", "size", "iconId"]);
return (React.createElement(IconContainer, Object.assign({ height: size, width: size }, props),
React.createElement("use", { xlinkHref: `#${iconId}` })));
};
//# sourceMappingURL=Icon.js.map