oolib 2.69.0 → 2.69.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.
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export function EmptyStates({ preset, actionOnClick, additionalActionOnClick, titleStyle, subTitleStyle }: {
|
|
1
|
+
export function EmptyStates({ preset, actionOnClick, additionalActionOnClick, titleStyle, subTitleStyle, title: titleProp }: {
|
|
2
2
|
preset: any;
|
|
3
3
|
actionOnClick: any;
|
|
4
4
|
additionalActionOnClick: any;
|
|
5
5
|
titleStyle: any;
|
|
6
6
|
subTitleStyle: any;
|
|
7
|
+
title: any;
|
|
7
8
|
}): React.JSX.Element;
|
|
8
9
|
import React from "react";
|
|
@@ -29,10 +29,11 @@ var congratulationsImg_svg_1 = __importDefault(require("../../assets/images/cong
|
|
|
29
29
|
var searchDashBoardListing_svg_1 = __importDefault(require("../../assets/images/searchDashBoardListing.svg"));
|
|
30
30
|
var dashboardListing_svg_1 = __importDefault(require("../../assets/images/dashboardListing.svg"));
|
|
31
31
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
32
|
-
var StyledContainer = (0, styled_components_1.default)(Container_1.Container)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["
|
|
32
|
+
var StyledContainer = (0, styled_components_1.default)(Container_1.Container)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: ", ";\n display: ", ";\n justify-content: \"center\";\n text-align: ", ";\n\n ", " {\n padding: ", ";\n }\n"], ["\n padding: ", ";\n display: ", ";\n justify-content: \"center\";\n text-align: ", ";\n\n ", " {\n padding: ", ";\n }\n"])), function (props) { return (props.layout === "center" ? "2rem 0rem" : "4rem 0"); }, function (props) { return props.layout === "center" && "flex"; }, function (props) { return props.layout === "center" && "center"; }, (0, mixins_1.mediaQuery)("sm"), function (props) { return (props.layout === "center" ? "4rem 0" : "6rem 0"); });
|
|
33
33
|
var EmptyStates = function (_a) {
|
|
34
|
-
var preset = _a.preset, actionOnClick = _a.actionOnClick, additionalActionOnClick = _a.additionalActionOnClick, titleStyle = _a.titleStyle, subTitleStyle = _a.subTitleStyle;
|
|
35
|
-
var _b = config_1.emptyStatesConfig[preset], img = _b.img, imgSize = _b.imgSize,
|
|
34
|
+
var preset = _a.preset, actionOnClick = _a.actionOnClick, additionalActionOnClick = _a.additionalActionOnClick, titleStyle = _a.titleStyle, subTitleStyle = _a.subTitleStyle, titleProp = _a.title;
|
|
35
|
+
var _b = config_1.emptyStatesConfig[preset], img = _b.img, imgSize = _b.imgSize, titleConfig = _b.title, subTitle = _b.subTitle, action = _b.action, additionalAction = _b.additionalAction, layout = _b.layout, opacity = _b.opacity;
|
|
36
|
+
var title = titleProp || titleConfig; //if a title prop is provided, it overrides title from config
|
|
36
37
|
var imgConfig = {
|
|
37
38
|
publishedListing: publishedListing_svg_1.default,
|
|
38
39
|
contentListing: contentListing_svg_1.default,
|
|
@@ -44,22 +45,22 @@ var EmptyStates = function (_a) {
|
|
|
44
45
|
mailBoxImg: mailBoxImg_svg_1.default,
|
|
45
46
|
congratulationsImg: congratulationsImg_svg_1.default,
|
|
46
47
|
searchDashBoardListing: searchDashBoardListing_svg_1.default,
|
|
47
|
-
dashboardListing: dashboardListing_svg_1.default
|
|
48
|
+
dashboardListing: dashboardListing_svg_1.default,
|
|
48
49
|
};
|
|
49
|
-
var Title = (0, styled_components_1.default)(Typo_1.SERIF_5_6)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n
|
|
50
|
-
var SubTitle = (0, styled_components_1.default)(Typo_1.SANS_3_4)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n
|
|
50
|
+
var Title = (0, styled_components_1.default)(Typo_1.SERIF_5_6)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n "], ["\n ", "\n "])), titleStyle ? titleStyle : { marginTop: "2rem" });
|
|
51
|
+
var SubTitle = (0, styled_components_1.default)(Typo_1.SANS_3_4)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n ", "\n "], ["\n ", "\n "])), subTitleStyle ? subTitleStyle : { marginTop: "1rem" });
|
|
51
52
|
return (react_1.default.createElement(StyledContainer, { layout: layout },
|
|
52
53
|
react_1.default.createElement(Wrappers_1.Wrapper650, { style: { margin: layout === "center" ? "auto" : 0 } },
|
|
53
|
-
img && (react_1.default.createElement("img", { src: imgConfig[img], alt:
|
|
54
|
-
opacity: opacity ? opacity : layout === "center" ?
|
|
55
|
-
height: imgSize ? imgSize +
|
|
54
|
+
img && (react_1.default.createElement("img", { src: imgConfig[img], alt: "", style: {
|
|
55
|
+
opacity: opacity ? opacity : layout === "center" ? "0.6" : "0.5",
|
|
56
|
+
height: imgSize ? imgSize + "px" : "120px",
|
|
56
57
|
} })),
|
|
57
58
|
title && react_1.default.createElement(Title, null, title),
|
|
58
59
|
subTitle && react_1.default.createElement(SubTitle, null, subTitle),
|
|
59
60
|
additionalAction && (react_1.default.createElement(Paddings_1.PaddingTop10, null,
|
|
60
61
|
react_1.default.createElement(Typo_1.SANS_3, null,
|
|
61
62
|
react_1.default.createElement(OKELink_1.OKELink, { to: "#", onClick: additionalActionOnClick }, additionalAction.text))))),
|
|
62
|
-
action && (react_1.default.createElement(Buttons_1.ButtonPrimary, { onClick: actionOnClick, style: { marginTop:
|
|
63
|
+
action && (react_1.default.createElement(Buttons_1.ButtonPrimary, { onClick: actionOnClick, style: { marginTop: "2rem", opacity: "1" } }, action === null || action === void 0 ? void 0 : action.btnText))));
|
|
63
64
|
};
|
|
64
65
|
exports.EmptyStates = EmptyStates;
|
|
65
66
|
var templateObject_1, templateObject_2, templateObject_3;
|