oolib 2.152.0 → 2.152.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -48,7 +48,8 @@ var HomeCover = function (_a) {
|
|
|
48
48
|
var title = _a.title, subtitle = _a.subtitle, desc = _a.desc, CTALink = _a.CTALink, customComp = _a.customComp, coverImagesConfig = _a.coverImagesConfig, _b = _a.variant, variant = _b === void 0 ? "default" : _b;
|
|
49
49
|
var screenWidth = (0, useScreenWidth_1.useScreenWidth)();
|
|
50
50
|
var isDesktop = screenWidth > (0, mixins_1.getBreakPoint)("md");
|
|
51
|
-
var history = (0, react_router_dom_1.useHistory)();
|
|
51
|
+
var history = react_router_dom_1.useHistory ? (0, react_router_dom_1.useHistory)() : undefined;
|
|
52
|
+
var navigate = react_router_dom_1.useNavigate ? (0, react_router_dom_1.useNavigate)() : undefined;
|
|
52
53
|
// const {deployment: {_CoverImages : coverImagesConfig}} = useGetQueryData('platformConfigs');
|
|
53
54
|
//backwards compat
|
|
54
55
|
var _CoverImages = coverImagesConfig.every(function (c) { return typeof c === "string"; })
|
|
@@ -132,7 +133,7 @@ var HomeCover = function (_a) {
|
|
|
132
133
|
var genCTALink = function (_a) {
|
|
133
134
|
var CTALink = _a.CTALink, variant = _a.variant, isDesktop = _a.isDesktop;
|
|
134
135
|
return CTALink && (react_1.default.createElement(Buttons_1.ButtonPrimary, { className: "HomeCover__cta", icon: "CaretRight", M: variant === "small" && !isDesktop && true, style: __assign({ position: "absolute", bottom: 0, borderRadius: 0, right: variant === "small" && !isDesktop ? "2rem" : 0 }, (variant === "small" && !isDesktop ? { zIndex: 100 } : {})), onClick: function () {
|
|
135
|
-
history.push(CTALink);
|
|
136
|
+
history ? history.push(CTALink) : navigate(CTALink);
|
|
136
137
|
} }));
|
|
137
138
|
};
|
|
138
139
|
var TitleTypoComp = variant === "small" ? Typo_1.SERIF_8_9 : Typo_1.SERIF_9_10;
|
|
@@ -28,5 +28,5 @@ exports.SERIF_8_9_STYLED = styled_components_1.default.h2(templateObject_15 || (
|
|
|
28
28
|
exports.SERIF_9_10_STYLED = styled_components_1.default.h1(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), index_1.typo.SERIF_9_10);
|
|
29
29
|
exports.LABEL_STYLED = styled_components_1.default.h6(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), index_1.typo.LABEL);
|
|
30
30
|
exports.BLOCKQUOTE_STYLED = styled_components_1.default.h3(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), index_1.typo.BLOCKQUOTE);
|
|
31
|
-
exports.TYPOCLASSES = styled_components_1.default.div(templateObject_19 || (templateObject_19 = __makeTemplateObject(["\n .SANS_0 {\n ", "\n }\n\n .SANS_2 {\n ", "\n }\n\n .SANS_3 {\n ", "\n }\n\n .SANS_4 {\n ", "\n }\n\n .SERIF_3 {\n ", "\n }\n\n .SANS_4_5 {\n ", "\n }\n\n .SANS_5_6 {\n ", "\n }\n\n .SERIF_3_4 {\n ", "\n }\n\n .SERIF_4_5 {\n ", "\n }\n\n .SERIF_5_6 {\n ", "\n }\n\n .SERIF_6_7 {\n ", "\n }\n\n .SERIF_7_8 {\n ", "\n }\n\n .SERIF_8_9 {\n ", "\n }\n\n .SERIF_9_10 {\n ", "\n }\n\n .LABEL {\n ", "\n }\n\n .SANS_7_8 {\n ", "\n }\n\n .BLOCKQUOTE {\n ", "\n }\n\n
|
|
31
|
+
exports.TYPOCLASSES = styled_components_1.default.div(templateObject_19 || (templateObject_19 = __makeTemplateObject(["\n .SANS_0 {\n ", "\n }\n\n .SANS_2 {\n ", "\n }\n\n .SANS_3 {\n ", "\n }\n\n .SANS_4 {\n ", "\n }\n\n .SERIF_3 {\n ", "\n }\n\n .SANS_4_5 {\n ", "\n }\n\n .SANS_5_6 {\n ", "\n }\n\n .SERIF_3_4 {\n ", "\n }\n\n .SERIF_4_5 {\n ", "\n }\n\n .SERIF_5_6 {\n ", "\n }\n\n .SERIF_6_7 {\n ", "\n }\n\n .SERIF_7_8 {\n ", "\n }\n\n .SERIF_8_9 {\n ", "\n }\n\n .SERIF_9_10 {\n ", "\n }\n\n .LABEL {\n ", "\n }\n\n .SANS_7_8 {\n ", "\n }\n\n .BLOCKQUOTE {\n ", "\n }\n\n"], ["\n .SANS_0 {\n ", "\n }\n\n .SANS_2 {\n ", "\n }\n\n .SANS_3 {\n ", "\n }\n\n .SANS_4 {\n ", "\n }\n\n .SERIF_3 {\n ", "\n }\n\n .SANS_4_5 {\n ", "\n }\n\n .SANS_5_6 {\n ", "\n }\n\n .SERIF_3_4 {\n ", "\n }\n\n .SERIF_4_5 {\n ", "\n }\n\n .SERIF_5_6 {\n ", "\n }\n\n .SERIF_6_7 {\n ", "\n }\n\n .SERIF_7_8 {\n ", "\n }\n\n .SERIF_8_9 {\n ", "\n }\n\n .SERIF_9_10 {\n ", "\n }\n\n .LABEL {\n ", "\n }\n\n .SANS_7_8 {\n ", "\n }\n\n .BLOCKQUOTE {\n ", "\n }\n\n"])), index_1.typo.SANS_0, index_1.typo.SANS_2, index_1.typo.SANS_3, index_1.typo.SANS_4, index_1.typo.SERIF_3, index_1.typo.SANS_4_5, index_1.typo.SANS_5_6, index_1.typo.SERIF_3_4, index_1.typo.SERIF_4_5, index_1.typo.SERIF_5_6, index_1.typo.SERIF_6_7, index_1.typo.SERIF_7_8, index_1.typo.SERIF_8_9, index_1.typo.SERIF_9_10, index_1.typo.LABEL, index_1.typo.SANS_7_8, index_1.typo.BLOCKQUOTE);
|
|
32
32
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19;
|