@team-monolith/cds 1.111.1 → 1.111.2
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/patterns/Tabs.d.ts +2 -1
- package/dist/patterns/Tabs.js +3 -2
- package/package.json +1 -1
package/dist/patterns/Tabs.d.ts
CHANGED
package/dist/patterns/Tabs.js
CHANGED
|
@@ -3,7 +3,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
|
3
3
|
import { css } from "@emotion/react";
|
|
4
4
|
import styled from "@emotion/styled";
|
|
5
5
|
import { HOVER } from "../utils/hover";
|
|
6
|
-
export const
|
|
6
|
+
export const tabsClasses = {
|
|
7
|
+
root: "Tabs",
|
|
7
8
|
tabBar: "Tabs-tabBar",
|
|
8
9
|
tab: "Tabs-tab",
|
|
9
10
|
activeIndicator: "Tabs-activeIndicator",
|
|
@@ -15,7 +16,7 @@ export const TabsClasses = {
|
|
|
15
16
|
*/
|
|
16
17
|
export function Tabs({ className, activeKey, onTabClick, items }) {
|
|
17
18
|
var _a;
|
|
18
|
-
return (_jsxs(Wrapper, { className: className, children: [_jsx(TabBar, { className:
|
|
19
|
+
return (_jsxs(Wrapper, { className: [tabsClasses.root, className].filter(Boolean).join(" "), children: [_jsx(TabBar, { className: tabsClasses.tabBar, children: items.map((item) => (_jsxs(Tab, { className: tabsClasses.tab, onClick: (event) => onTabClick === null || onTabClick === void 0 ? void 0 : onTabClick(item.key, event), active: activeKey === item.key, children: [item.label, activeKey === item.key && (_jsx(ActiveIndicator, { className: tabsClasses.activeIndicator }))] }, item.key))) }), (_a = items.find((item) => item.key === activeKey)) === null || _a === void 0 ? void 0 : _a.children] }));
|
|
19
20
|
}
|
|
20
21
|
const Wrapper = styled.div `
|
|
21
22
|
display: flex;
|