Skip to content

Commit

Permalink
Revert "PatternFly the PageSection component" (#1044)
Browse files Browse the repository at this point in the history
  • Loading branch information
gavin-stackrox authored Oct 20, 2023
1 parent b7e9d7a commit 99144f3
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions ui/src/components/PageSection.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { ReactElement, ReactNode } from 'react';
import { Panel, PanelMain, PanelMainBody, PanelHeader, Divider } from '@patternfly/react-core';

type Props = {
header: ReactNode;
Expand All @@ -9,12 +8,15 @@ type Props = {

export default function PageSection({ header, className = '', children }: Props): ReactElement {
return (
<Panel className={className}>
<PanelHeader className="pf-u-font-size-2xl">{header}</PanelHeader>
<Divider />
<PanelMain>
<PanelMainBody>{children}</PanelMainBody>
</PanelMain>
</Panel>
<div className="border-t-3 border-base-400 flex flex-col h-full min-h-0">
<div className={`h-full overflow-auto ${className}`}>
<header className="border-b-2 border-base-400 px-4 py-2">
<h2 className="bg-base-0 capitalize font-600 sticky text-4xl text-base-600 top-0">
{header}
</h2>
</header>
<div className="flex flex-col p-4">{children}</div>
</div>
</div>
);
}

0 comments on commit 99144f3

Please sign in to comment.