Skip to content

Commit dd6acd7

Browse files
authored
Merge pull request #2239 from dxc-technology/Mil4n0r/tokens-typography
Typography redesign
2 parents 648c007 + 190f628 commit dd6acd7

File tree

11 files changed

+358
-1090
lines changed

11 files changed

+358
-1090
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 TypographyPageLayout from "screens/components/typography/TypographyPageLayout";
4+
import TypographyCodePage from "screens/components/typography/code/TypographyCodePage";
5+
6+
const Code = () => (
7+
<>
8+
<Head>
9+
<title>Typography — Halstack Design System</title>
10+
</Head>
11+
<TypographyCodePage />
12+
</>
13+
);
14+
15+
Code.getLayout = (page: ReactElement) => <TypographyPageLayout>{page}</TypographyPageLayout>;
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 TypographyPageLayout from "screens/components/typography/TypographyPageLayout";
4-
import TypographyCodePage from "screens/components/typography/code/TypographyCodePage";
4+
import TypographyOverviewPage from "screens/components/typography/overview/TypographyOverviewPage";
55

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

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

2117
export default Index;

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

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

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

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

apps/website/screens/components/typography/TypographyPageLayout.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
import PageHeading from "@/common/PageHeading";
2-
import { DxcFlex, DxcAlert } from "@dxc-technology/halstack-react";
2+
import { DxcFlex, DxcAlert, DxcParagraph } from "@dxc-technology/halstack-react";
33
import TabsPageHeading from "@/common/TabsPageLayout";
44
import ComponentHeading from "@/common/ComponentHeading";
55
import { ReactNode } from "react";
66

77
const TypographyPageHeading = ({ children }: { children: ReactNode }) => {
88
const tabs = [
9-
{ label: "Code", path: "/components/typography" },
10-
{ label: "Usage", path: "/components/typography/usage" },
11-
{ label: "Specifications", path: "/components/typography/specifications" },
9+
{ label: "Overview", path: "/components/typography" },
10+
{ label: "Code", path: "/components/typography/code" },
1211
];
1312

1413
return (
1514
<DxcFlex direction="column" gap="var(--spacing-gap-xxl)">
1615
<PageHeading>
1716
<DxcFlex direction="column" gap="var(--spacing-gap-xl)">
1817
<ComponentHeading name="Typography" />
18+
<DxcParagraph>
19+
Typography component is a primitive. This means that using this component, you can create any typography
20+
variant that is included in the Halstack Design System.
21+
</DxcParagraph>
1922
<DxcAlert
2023
title="Usage"
2124
semantic="warning"
@@ -24,7 +27,7 @@ const TypographyPageHeading = ({ children }: { children: ReactNode }) => {
2427
}}
2528
closable={false}
2629
/>
27-
<TabsPageHeading tabs={tabs}></TabsPageHeading>
30+
<TabsPageHeading tabs={tabs} />
2831
</DxcFlex>
2932
</PageHeading>
3033
{children}

0 commit comments

Comments
 (0)