react-life-design
Version:
Life Design UI components
31 lines • 3.21 kB
JavaScript
"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;
};
Object.defineProperty(exports, "__esModule", { value: true });
var styled_components_1 = require("styled-components");
var Sizes_1 = require("../Sizes");
var Colors_1 = require("../Colors");
var TextHelper_1 = require("../TextHelper");
var containerHeight = function (_a) {
var children = _a.children;
return children[0].clientHeight + children[1].clientHeight;
};
exports.Wrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n transition: all .25s ease-in-out;\n height: ", "\n ", "\n"], ["\n transition: all .25s ease-in-out;\n height: ", "\n ",
"\n"])), function (_a) {
var initialHeight = _a.initialHeight;
return initialHeight + "px;";
}, function (_a) {
var active = _a.active, current = _a.forwardedRef.current;
return (active && "\n height: " + containerHeight(current) + "px;\n\n & .content {\n opacity: 1;\n }\n ");
});
exports.Header = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n line-height: 1.2;\n font-size: 20px;\n font-family: ", ";\n padding: ", "px 0;\n position: relative;\n border-bottom: 1px solid ", ";\n display: flex;\n justify-content: space-between;\n align-items: center;\n cursor: pointer;\n\n svg {\n margin-left: 109px;\n\n path {\n stroke-width: 1.25px;\n }\n }\n\n & .label-icons {\n display: inline-flex;\n align-items: center;\n }\n\n ", "\n"], ["\n line-height: 1.2;\n font-size: 20px;\n font-family: ", ";\n padding: ", "px 0;\n position: relative;\n border-bottom: 1px solid ", ";\n display: flex;\n justify-content: space-between;\n align-items: center;\n cursor: pointer;\n\n svg {\n margin-left: 109px;\n\n path {\n stroke-width: 1.25px;\n }\n }\n\n & .label-icons {\n display: inline-flex;\n align-items: center;\n }\n\n ", "\n"])), TextHelper_1.default.fontVariant('medium'), Sizes_1.default.s3, Colors_1.default.line, function (_a) {
var active = _a.active;
return active && "color: " + Colors_1.default.mongeral + ";";
});
exports.Content = styled_components_1.default.div.attrs({
className: 'content'
})(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n padding: ", "px;\n border-right: 1px solid ", ";\n border-bottom: 1px solid ", ";\n border-left: 1px solid ", ";\n opacity: 0;\n transition: all .14s ease-in-out;\n\n @media screen and (max-width: 768px) {\n padding: ", "px;\n }\n"], ["\n padding: ", "px;\n border-right: 1px solid ", ";\n border-bottom: 1px solid ", ";\n border-left: 1px solid ", ";\n opacity: 0;\n transition: all .14s ease-in-out;\n\n @media screen and (max-width: 768px) {\n padding: ", "px;\n }\n"])), Sizes_1.default.s4, Colors_1.default.line, Colors_1.default.line, Colors_1.default.line, Sizes_1.default.s3);
var templateObject_1, templateObject_2, templateObject_3;
//# sourceMappingURL=Accordion.styled.js.map