UNPKG

react-life-design

Version:
47 lines 3.58 kB
"use strict"; var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } return cooked; }; var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; 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 }); var React = require("react"); var styled_components_1 = require("styled-components"); var Colors_1 = require("../Colors"); var Sizes_1 = require("../Sizes"); var CloseIcon = styled_components_1.default.svg(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n .close {\n fill: none;\n stroke: ", ";\n stroke-miterlimit: ", ";\n stroke-width: 2px;\n }\n\n .close {\n transition: stroke 0.15s ease-in-out;\n }\n \n .close.one {\n transition: transform 0.15s ease-in-out;\n transform-origin: center;\n }\n \n .close.two {\n transition: transform 0.15s 0.1s ease-in-out;\n transform-origin: center;\n }\n \n .close.square {\n transform: scale(0);\n transition: transform 0.15s 0.1s ease-in-out;\n transform-origin: center;\n }\n\n ", "\n"], ["\n .close {\n fill: none;\n stroke: ", ";\n stroke-miterlimit: ", ";\n stroke-width: 2px;\n }\n\n .close {\n transition: stroke 0.15s ease-in-out;\n }\n \n .close.one {\n transition: transform 0.15s ease-in-out;\n transform-origin: center;\n }\n \n .close.two {\n transition: transform 0.15s 0.1s ease-in-out;\n transform-origin: center;\n }\n \n .close.square {\n transform: scale(0);\n transition: transform 0.15s 0.1s ease-in-out;\n transform-origin: center;\n }\n\n ", "\n"])), function (_a) { var color = _a.color; return color || Colors_1.default.mongeral; }, Sizes_1.default.s2, function (_a) { var noHover = _a.noHover; return !noHover && "\n &:hover .close {\n stroke: #003C64;\n }\n\n &:hover .close.one {\n transform: scale(0.2);\n }\n\n &:hover .close.two {\n transform: scale(0.2)\n }\n \n &:hover .close.square {\n transform: scale(0.8);\n fill: #003C64;\n }\n "; }); exports.default = React.memo(function (_a) { var width = _a.width, height = _a.height, props = __rest(_a, ["width", "height"]); return (React.createElement(CloseIcon, __assign({ viewBox: '0 0 22 20.4', width: width || Sizes_1.default.s5, height: height || Sizes_1.default.s5 }, props), React.createElement("line", { className: "close two", x1: "3", y1: "18.2", x2: "19", y2: "2.2" }), React.createElement("line", { className: "close one", x1: "19", y1: "18.2", x2: "3", y2: "2.2" }), React.createElement("rect", { className: "close square", x: "8", y: "7.2", width: "6", height: "6" }))); }); var templateObject_1; //# sourceMappingURL=Close.js.map