Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions apps/website/pages/components/typography/code.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import Head from "next/head";
import type { ReactElement } from "react";
import TypographyPageLayout from "screens/components/typography/TypographyPageLayout";
import TypographyCodePage from "screens/components/typography/code/TypographyCodePage";

const Code = () => (
<>
<Head>
<title>Typography — Halstack Design System</title>
</Head>
<TypographyCodePage />
</>
);

Code.getLayout = (page: ReactElement) => <TypographyPageLayout>{page}</TypographyPageLayout>;

export default Code;
24 changes: 10 additions & 14 deletions apps/website/pages/components/typography/index.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
import Head from "next/head";
import type { ReactElement } from "react";
import TypographyPageLayout from "screens/components/typography/TypographyPageLayout";
import TypographyCodePage from "screens/components/typography/code/TypographyCodePage";
import TypographyOverviewPage from "screens/components/typography/overview/TypographyOverviewPage";

const Index = () => {
return (
<>
<Head>
<title>Typography — Halstack Design System</title>
</Head>
<TypographyCodePage />
</>
);
};
const Index = () => (
<>
<Head>
<title>Typography — Halstack Design System</title>
</Head>
<TypographyOverviewPage />
</>
);

Index.getLayout = function getLayout(page: ReactElement) {
return <TypographyPageLayout>{page}</TypographyPageLayout>;
};
Index.getLayout = (page: ReactElement) => <TypographyPageLayout>{page}</TypographyPageLayout>;

export default Index;
21 changes: 0 additions & 21 deletions apps/website/pages/components/typography/specifications.tsx

This file was deleted.

21 changes: 0 additions & 21 deletions apps/website/pages/components/typography/usage.tsx

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
import PageHeading from "@/common/PageHeading";
import { DxcFlex, DxcAlert } from "@dxc-technology/halstack-react";
import { DxcFlex, DxcAlert, DxcParagraph } from "@dxc-technology/halstack-react";
import TabsPageHeading from "@/common/TabsPageLayout";
import ComponentHeading from "@/common/ComponentHeading";
import { ReactNode } from "react";

const TypographyPageHeading = ({ children }: { children: ReactNode }) => {
const tabs = [
{ label: "Code", path: "/components/typography" },
{ label: "Usage", path: "/components/typography/usage" },
{ label: "Specifications", path: "/components/typography/specifications" },
{ label: "Overview", path: "/components/typography" },
{ label: "Code", path: "/components/typography/code" },
];

return (
<DxcFlex direction="column" gap="var(--spacing-gap-xxl)">
<PageHeading>
<DxcFlex direction="column" gap="var(--spacing-gap-xl)">
<ComponentHeading name="Typography" />
<DxcParagraph>
Typography component is a primitive. This means that using this component, you can create any typography
variant that is included in the Halstack Design System.
</DxcParagraph>
<DxcAlert
title="Usage"
semantic="warning"
Expand All @@ -24,7 +27,7 @@ const TypographyPageHeading = ({ children }: { children: ReactNode }) => {
}}
closable={false}
/>
<TabsPageHeading tabs={tabs}></TabsPageHeading>
<TabsPageHeading tabs={tabs} />
</DxcFlex>
</PageHeading>
{children}
Expand Down
Loading