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/select/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 SelectPageLayout from "screens/components/select/SelectPageLayout";
import SelectCodePage from "screens/components/select/code/SelectCodePage";

const Code = () => (
<>
<Head>
<title>Select code — Halstack Design System</title>
</Head>
<SelectCodePage />
</>
);

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

export default Code;
24 changes: 10 additions & 14 deletions apps/website/pages/components/select/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 SelectPageLayout from "screens/components/select/SelectPageLayout";
import SelectCodePage from "screens/components/select/code/SelectCodePage";
import SelectOverviewPage from "screens/components/select/overview/SelectOverviewPage";

const Index = () => {
return (
<>
<Head>
<title>Select — Halstack Design System</title>
</Head>
<SelectCodePage></SelectCodePage>
</>
);
};
const Index = () => (
<>
<Head>
<title>Select — Halstack Design System</title>
</Head>
<SelectOverviewPage />
</>
);

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

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

This file was deleted.

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

This file was deleted.

7 changes: 3 additions & 4 deletions apps/website/screens/components/select/SelectPageLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ import { ReactNode } from "react";

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

return (
Expand All @@ -19,7 +18,7 @@ const SelectPageHeading = ({ children }: { children: ReactNode }) => {
<DxcParagraph>
The select component allows users to make single or multiple selections from a pre-defined list of options.
</DxcParagraph>
<TabsPageHeading tabs={tabs}></TabsPageHeading>
<TabsPageHeading tabs={tabs} />
</DxcFlex>
</PageHeading>
{children}
Expand Down
Loading