react-icon-blur
Version:
Icon Blur Library
36 lines (26 loc) • 1.97 kB
JavaScript
function ___$insertStyle(css) {
if (!css) {
return;
}
if (typeof window === 'undefined') {
return;
}
var style = document.createElement('style');
style.setAttribute('type', 'text/css');
style.innerHTML = css;
document.head.appendChild(style);
return css;
}
Object.defineProperty(exports, '__esModule', { value: true });
var React = require('react');
___$insertStyle(".icon-wrapper .icon-container .icon {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n box-shadow: inset 0 0 1px 1px rgba(0, 0, 0, 0.015);\n}\n.icon-wrapper .icon-container .icon img {\n z-index: 2;\n filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.12));\n}\n.icon-wrapper .icon-container .icon .background {\n position: absolute;\n z-index: 1;\n pointer-events: none;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n transform: scale(2);\n filter: blur(13px) opacity(0.2);\n}\n.icon-wrapper .icon-container .rounded {\n border-radius: 10%;\n}\n.icon-wrapper .icon-container .square {\n border-radius: 0%;\n}\n.icon-wrapper .icon-container .circle {\n border-radius: 100%;\n}");
var IconBlur = function (props) { return (React.createElement("div", { className: "icon-wrapper", onClick: function () { return props.onClick && props.onClick(); } },
React.createElement("div", { className: "icon-container " + (props.onClick ? 'pointer' : '') },
React.createElement("div", { className: "icon " + props.type.toLowerCase(), style: {
padding: props.padding ? props.padding + "px" : '5px',
width: props.size ? props.size + "px" : '100px',
} },
React.createElement("img", { alt: "", "aria-hidden": true, src: props.src, className: "background" }),
React.createElement("img", { alt: "icon-" + props.name, src: props.src, width: "100%" }))))); };
exports.default = IconBlur;
//# sourceMappingURL=index.js.map