@doyourjob/gravity-ui-page-constructor-addons 2.1.22 → 2.1.24
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.
- package/build/cjs/components/HeaderStripe/HeaderStripe.js +4 -1
- package/build/cjs/components/Navigation/components/Navigation/NavigationItemsList/NavigationItemsList.js +1 -1
- package/build/esm/components/HeaderStripe/HeaderStripe.js +4 -1
- package/build/esm/components/Navigation/components/Navigation/NavigationItemsList/NavigationItemsList.js +1 -1
- package/package.json +1 -1
|
@@ -61,6 +61,9 @@ const HeaderStripe = ({ duration = 8000, items, textColor, background, backgroun
|
|
|
61
61
|
return properties;
|
|
62
62
|
}, [textColor, background, backgroundImage]);
|
|
63
63
|
const contentStyle = (0, react_1.useMemo)(() => {
|
|
64
|
+
if (!newDesign) {
|
|
65
|
+
return {};
|
|
66
|
+
}
|
|
64
67
|
const item = filteredItems[activeIndex];
|
|
65
68
|
const properties = {};
|
|
66
69
|
if (typeof item === 'object' && item.background) {
|
|
@@ -70,7 +73,7 @@ const HeaderStripe = ({ duration = 8000, items, textColor, background, backgroun
|
|
|
70
73
|
properties.color = item.textColor;
|
|
71
74
|
}
|
|
72
75
|
return properties;
|
|
73
|
-
}, [filteredItems, activeIndex]);
|
|
76
|
+
}, [newDesign, filteredItems, activeIndex]);
|
|
74
77
|
return (react_1.default.createElement("div", { className: b('root', {
|
|
75
78
|
'only-desktop': onlyDesktop,
|
|
76
79
|
closing: isClosing,
|
|
@@ -6,6 +6,6 @@ const react_1 = tslib_1.__importDefault(require("react"));
|
|
|
6
6
|
const gravity_ui_page_constructor_1 = require("@doyourjob/gravity-ui-page-constructor");
|
|
7
7
|
const NavigationPopupItem_1 = require("../NavigationPopupItem/NavigationPopupItem");
|
|
8
8
|
const NavigationItemsList = ({ items, itemClassName, className, sizes, }) => {
|
|
9
|
-
return (react_1.default.createElement(gravity_ui_page_constructor_1.Row, { className: className }, items.map((item) => (react_1.default.createElement(NavigationPopupItem_1.NavigationPopupItem, Object.assign({}, item, { sizes: sizes, className: itemClassName, key: item.slug, hover: true }))))));
|
|
9
|
+
return (react_1.default.createElement(gravity_ui_page_constructor_1.Row, { className: className }, items.map((item, index) => (react_1.default.createElement(NavigationPopupItem_1.NavigationPopupItem, Object.assign({}, item, { sizes: sizes, className: itemClassName, key: item.slug + index, hover: true }))))));
|
|
10
10
|
};
|
|
11
11
|
exports.NavigationItemsList = NavigationItemsList;
|
|
@@ -58,6 +58,9 @@ export const HeaderStripe = ({ duration = 8000, items, textColor, background, ba
|
|
|
58
58
|
return properties;
|
|
59
59
|
}, [textColor, background, backgroundImage]);
|
|
60
60
|
const contentStyle = useMemo(() => {
|
|
61
|
+
if (!newDesign) {
|
|
62
|
+
return {};
|
|
63
|
+
}
|
|
61
64
|
const item = filteredItems[activeIndex];
|
|
62
65
|
const properties = {};
|
|
63
66
|
if (typeof item === 'object' && item.background) {
|
|
@@ -67,7 +70,7 @@ export const HeaderStripe = ({ duration = 8000, items, textColor, background, ba
|
|
|
67
70
|
properties.color = item.textColor;
|
|
68
71
|
}
|
|
69
72
|
return properties;
|
|
70
|
-
}, [filteredItems, activeIndex]);
|
|
73
|
+
}, [newDesign, filteredItems, activeIndex]);
|
|
71
74
|
return (React.createElement("div", { className: b('root', {
|
|
72
75
|
'only-desktop': onlyDesktop,
|
|
73
76
|
closing: isClosing,
|
|
@@ -2,5 +2,5 @@ import React from 'react';
|
|
|
2
2
|
import { Row } from '@doyourjob/gravity-ui-page-constructor';
|
|
3
3
|
import { NavigationPopupItem } from '../NavigationPopupItem/NavigationPopupItem';
|
|
4
4
|
export const NavigationItemsList = ({ items, itemClassName, className, sizes, }) => {
|
|
5
|
-
return (React.createElement(Row, { className: className }, items.map((item) => (React.createElement(NavigationPopupItem, Object.assign({}, item, { sizes: sizes, className: itemClassName, key: item.slug, hover: true }))))));
|
|
5
|
+
return (React.createElement(Row, { className: className }, items.map((item, index) => (React.createElement(NavigationPopupItem, Object.assign({}, item, { sizes: sizes, className: itemClassName, key: item.slug + index, hover: true }))))));
|
|
6
6
|
};
|