kiban-design-system 1.0.270-alpha.0 → 1.0.271-alpha.0
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/dist/index.js
CHANGED
|
@@ -28413,8 +28413,8 @@ const Header$1 = ({ leftContent, rightContent, actions, userMenu, logo, extraAct
|
|
|
28413
28413
|
const { theme } = useTheme();
|
|
28414
28414
|
const renderAction = (item, index) => (jsx("div", Object.assign({ className: 'User-menu__secondary-action', onClick: item.onClick }, { children: jsx(Icon, { name: item.icon }, void 0) }), index || ''));
|
|
28415
28415
|
const renderActionWithTooltip = (item, index) => {
|
|
28416
|
-
var _a
|
|
28417
|
-
return (jsx(
|
|
28416
|
+
var _a;
|
|
28417
|
+
return (jsx(AlphaTooltip, Object.assign({ position: (_a = item.tooltip) === null || _a === void 0 ? void 0 : _a.position, content: (item.tooltip && item.tooltip.text) || '', appearance: 'default', theme: 'cloud' }, { children: renderAction(item) }), index));
|
|
28418
28418
|
};
|
|
28419
28419
|
return (jsxs(Fragment, { children: [jsxs("div", Object.assign({ className: `Header__${theme} Header__container` }, { children: [jsxs("div", Object.assign({ className: 'Header__container-logo' }, { children: [extraAction && (extraAction === null || extraAction === void 0 ? void 0 : extraAction.icon) && (jsx("div", Object.assign({ className: 'Header__container-logo__extra-action' }, { children: jsx(IconButton, { onClick: extraAction === null || extraAction === void 0 ? void 0 : extraAction.onClick, icon: extraAction.icon, isRound: true, size: 'small', appearance: 'tertiary' }, void 0) }), void 0)), logo && jsx(Logo, { name: logo, size: 'small' }, void 0), leftContent && (jsx("div", Object.assign({ className: 'Header__container-content-left' }, { children: leftContent }), void 0))] }), void 0), jsxs("div", Object.assign({ className: 'Header__right-container' }, { children: [rightContent && (jsx("div", Object.assign({ className: 'Header__right-content' }, { children: rightContent }), void 0)), jsxs("div", Object.assign({ className: 'Header__menus-container' }, { children: [jsx("hr", { className: 'User-menu__divider-left' }, void 0), actions === null || actions === void 0 ? void 0 : actions.map((item, i) => item.tooltip
|
|
28420
28420
|
? renderActionWithTooltip(item, i)
|