Skip to content

Commit 7fcdb5f

Browse files
committed
Merge branch 'gomezivann/bar-chart' of https://github.com/dxc-technology/halstack-react into gomezivann/bar-chart
2 parents 953ef4a + ff1b854 commit 7fcdb5f

File tree

4 files changed

+40
-1
lines changed

4 files changed

+40
-1
lines changed

website/screens/components/nav-tabs/code/NavTabsCodePage.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import basicUsage from "./examples/basicUsage";
1313
import routerLink from "./examples/routerLink";
1414
import routerLinkV6 from "./examples/routerLinkV6";
1515
import nextLink from "./examples/nextLink";
16+
import icons from "./examples/icons";
1617
import TableCode from "@/common/TableCode";
1718
import StatusBadge from "@/common/StatusBadge";
1819

@@ -287,6 +288,14 @@ const sections = [
287288
},
288289
],
289290
},
291+
{
292+
title: "Icons and notifications",
293+
content: (
294+
<>
295+
<Example example={icons} defaultIsVisible />
296+
</>
297+
),
298+
},
290299
],
291300
},
292301
];
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { DxcNavTabs, DxcInset } from "@dxc-technology/halstack-react";
2+
3+
const code = `() => {
4+
return (
5+
<DxcInset space="2rem">
6+
<DxcNavTabs iconPosition="left">
7+
<DxcNavTabs.Tab href="#" active icon="favorite" notificationNumber>
8+
Tab 1
9+
</DxcNavTabs.Tab>
10+
<DxcNavTabs.Tab href="#" disabled icon="favorite" notificationNumber={5}>
11+
Tab 2
12+
</DxcNavTabs.Tab>
13+
<DxcNavTabs.Tab href="#" icon="favorite" notificationNumber={120}>
14+
Tab 3
15+
</DxcNavTabs.Tab>
16+
</DxcNavTabs>
17+
</DxcInset>
18+
);
19+
}`;
20+
21+
const scope = {
22+
DxcNavTabs,
23+
DxcInset,
24+
};
25+
26+
export default { code, scope };

website/screens/components/tabs/code/TabsCodePage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ const sections = [
171171
content: <Example example={uncontrolled} defaultIsVisible />,
172172
},
173173
{
174-
title: "Icons",
174+
title: "Icons and notifications",
175175
content: <Example example={icons} defaultIsVisible />,
176176
},
177177
],

website/screens/components/tabs/code/examples/icons.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,18 @@ const code = `() => {
3636
{
3737
label: "3G Mobile",
3838
icon: mobileIcon,
39+
notificationNumber: true
3940
},
4041
{
4142
label: "Ethernet",
4243
icon: "settings_ethernet",
44+
isDisabled: true,
45+
notificationNumber: 2
4346
},
4447
{
4548
label: "Wifi",
4649
icon: "wifi",
50+
notificationNumber: 120
4751
},
4852
]}
4953
></DxcTabs>

0 commit comments

Comments
 (0)