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
19 changes: 19 additions & 0 deletions apps/website/pages/components/alert/code.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import Head from "next/head";
import type { ReactElement } from "react";
import AlertPageLayout from "screens/components/alert/AlertPageLayout";
import AlertCodePage from "screens/components/alert/code/AlertCodePage";

const Code = () => {
return (
<>
<Head>
<title>Alert Code — Halstack Design System</title>
</Head>
<AlertCodePage />
</>
);
};

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

export default Code;
8 changes: 3 additions & 5 deletions apps/website/pages/components/alert/index.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
import Head from "next/head";
import type { ReactElement } from "react";
import AlertPageLayout from "screens/components/alert/AlertPageLayout";
import AlertCodePage from "screens/components/alert/code/AlertCodePage";
import AlertOverviewPage from "screens/components/alert/overview/AlertOverviewPage";

const Index = () => {
return (
<>
<Head>
<title>Alert — Halstack Design System</title>
</Head>
<AlertCodePage></AlertCodePage>
<AlertOverviewPage />
</>
);
};

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

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

This file was deleted.

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

This file was deleted.

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

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

return (
Expand All @@ -17,11 +16,9 @@ const AlertPageHeading = ({ children }: { children: ReactNode }) => {
<DxcFlex direction="column" gap="2rem">
<ComponentHeading name="Alert" />
<DxcParagraph>
Alert messages are meant to provide contextual feedback about important changes in the interface. They are
used to convey essential information to the user, ensuring that critical updates or warnings are immediately
noticeable.
Alert messages are meant to provide contextual feedback about important changes in the interface.
</DxcParagraph>
<TabsPageHeading tabs={tabs}></TabsPageHeading>
<TabsPageHeading tabs={tabs} />
</DxcFlex>
</PageHeading>
{children}
Expand Down
18 changes: 8 additions & 10 deletions apps/website/screens/components/alert/code/AlertCodePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,15 +160,13 @@ const sections = [
},
];

const AlertCodePage = () => {
return (
<DxcFlex direction="column" gap="4rem">
<QuickNavContainerLayout>
<QuickNavContainer sections={sections} startHeadingLevel={2}></QuickNavContainer>
</QuickNavContainerLayout>
<DocFooter githubLink="https://github.com/dxc-technology/halstack-react/blob/master/apps/website/screens/components/alert/code/AlertCodePage.tsx" />
</DxcFlex>
);
};
const AlertCodePage = () => (
<DxcFlex direction="column" gap="4rem">
<QuickNavContainerLayout>
<QuickNavContainer sections={sections} startHeadingLevel={2}></QuickNavContainer>
</QuickNavContainerLayout>
<DocFooter githubLink="https://github.com/dxc-technology/halstack-react/blob/master/apps/website/screens/components/alert/code/AlertCodePage.tsx" />
</DxcFlex>
);

export default AlertCodePage;
Loading