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/flex/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 FlexPageLayout from "screens/components/flex/FlexPageLayout";
import FlexCodePage from "screens/components/flex/code/FlexCodePage";

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

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

export default Code;
24 changes: 10 additions & 14 deletions apps/website/pages/components/flex/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 FlexPageLayout from "screens/components/flex/FlexPageLayout";
import FlexCodePage from "screens/components/flex/code/FlexCodePage";
import FlexOverviewPage from "screens/components/flex/overview/FlexOverviewPage";

const Index = () => {
return (
<>
<Head>
<title>Flex — Halstack Design System</title>
</Head>
<FlexCodePage></FlexCodePage>
</>
);
};
const Index = () => (
<>
<Head>
<title>Flex — Halstack Design System</title>
</Head>
<FlexOverviewPage />
</>
);

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

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

This file was deleted.

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

This file was deleted.

21 changes: 7 additions & 14 deletions apps/website/screens/components/flex/FlexPageLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import { DxcParagraph, DxcFlex, DxcLink } from "@dxc-technology/halstack-react";
import { DxcParagraph, DxcFlex } from "@dxc-technology/halstack-react";
import PageHeading from "@/common/PageHeading";
import TabsPageHeading from "@/common/TabsPageLayout";
import ComponentHeading from "@/common/ComponentHeading";
import { ReactNode } from "react";

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

return (
Expand All @@ -17,17 +16,11 @@ const FlexPageHeading = ({ children }: { children: ReactNode }) => {
<DxcFlex direction="column" gap="2rem">
<ComponentHeading name="Flex" />
<DxcParagraph>
Flex allows users to build{" "}
<DxcLink
newWindow
href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Basic_Concepts_of_Flexbox"
>
Flexible Box Module
</DxcLink>{" "}
based layouts. It serves as a technical component that abstracts users from working directly with CSS
Flexbox and helps them write more semantic layouts.
The flex component allows users to build flexible box module based layouts. It serves as a technical
component that abstracts users from working directly with CSS flexible box layout and helps them write more
semantic layouts.
</DxcParagraph>
<TabsPageHeading tabs={tabs}></TabsPageHeading>
<TabsPageHeading tabs={tabs} />
</DxcFlex>
</PageHeading>
{children}
Expand Down
Loading