Skip to content

Commit b721d1e

Browse files
authored
Merge pull request #2235 from dxc-technology/Mil4n0r/tokens-sidenav
Sidenav redesign
2 parents 420107c + 0e1cab0 commit b721d1e

File tree

15 files changed

+613
-985
lines changed

15 files changed

+613
-985
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import Head from "next/head";
2+
import type { ReactElement } from "react";
3+
import SidenavPageLayout from "screens/components/sidenav/SidenavPageLayout";
4+
import SidenavCodePage from "screens/components/sidenav/code/SidenavCodePage";
5+
6+
const Code = () => (
7+
<>
8+
<Head>
9+
<title>Sidenav code — Halstack Design System</title>
10+
</Head>
11+
<SidenavCodePage />
12+
</>
13+
);
14+
15+
Code.getLayout = (page: ReactElement) => <SidenavPageLayout>{page}</SidenavPageLayout>;
16+
17+
export default Code;
Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
11
import Head from "next/head";
22
import type { ReactElement } from "react";
33
import SidenavPageLayout from "screens/components/sidenav/SidenavPageLayout";
4-
import SidenavCodePage from "screens/components/sidenav/code/SidenavCodePage";
4+
import SidenavOverviewPage from "screens/components/sidenav/overview/SidenavOverviewPage";
55

6-
const Index = () => {
7-
return (
8-
<>
9-
<Head>
10-
<title>Sidenav — Halstack Design System</title>
11-
</Head>
12-
<SidenavCodePage></SidenavCodePage>
13-
</>
14-
);
15-
};
6+
const Index = () => (
7+
<>
8+
<Head>
9+
<title>Sidenav — Halstack Design System</title>
10+
</Head>
11+
<SidenavOverviewPage />
12+
</>
13+
);
1614

17-
Index.getLayout = function getLayout(page: ReactElement) {
18-
return <SidenavPageLayout>{page}</SidenavPageLayout>;
19-
};
15+
Index.getLayout = (page: ReactElement) => <SidenavPageLayout>{page}</SidenavPageLayout>;
2016

2117
export default Index;

apps/website/pages/components/sidenav/specifications.tsx

Lines changed: 0 additions & 21 deletions
This file was deleted.

apps/website/pages/components/sidenav/usage.tsx

Lines changed: 0 additions & 21 deletions
This file was deleted.

apps/website/screens/components/sidenav/SidenavPageLayout.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ import { ReactNode } from "react";
77

88
const SidenavPageHeading = ({ children }: { children: ReactNode }) => {
99
const tabs = [
10-
{ label: "Code", path: "/components/sidenav" },
11-
{ label: "Usage", path: "/components/sidenav/usage" },
12-
{ label: "Specifications", path: "/components/sidenav/specifications" },
10+
{ label: "Overview", path: "/components/sidenav" },
11+
{ label: "Code", path: "/components/sidenav/code" },
1312
];
1413

1514
return (
@@ -18,9 +17,7 @@ const SidenavPageHeading = ({ children }: { children: ReactNode }) => {
1817
<DxcFlex direction="column" gap="var(--spacing-gap-xl)">
1918
<ComponentHeading name="Sidenav" />
2019
<DxcParagraph>
21-
The sidenav component is part of the layout of the application and it makes easier to divide the main screen
22-
into two different areas. The main area will have all the content and the sidenav as a secondary element as
23-
an index, including links to different resources on the web page.
20+
The sidenav component provides a vertical navigation structure placed on the left side of the interface.
2421
</DxcParagraph>
2522
<DxcParagraph>
2623
The sidenav is part of the application layout, so it can only be used inside of it. Please check the{" "}

0 commit comments

Comments
 (0)