Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added new component for PageLayout and refactor
- Loading branch information
1 parent
e19a596
commit 459c85a
Showing
8 changed files
with
78 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
frontend/packages/console-shared/src/components/layout/PageLayout.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
.ocs-page-layout { | ||
&__content { | ||
padding: var(--pf-global--spacer--lg); | ||
flex: 1; | ||
} | ||
|
||
&__header { | ||
background-color: var(--pf-global--BackgroundColor--light-100); | ||
} | ||
|
||
&__hint { | ||
padding-left: var(--pf-global--spacer--lg); | ||
padding-right: var(--pf-global--spacer--lg); | ||
padding-bottom: var(--pf-global--spacer--md); | ||
} | ||
|
||
&__title { | ||
padding-left: var(--pf-global--spacer--lg); | ||
padding-right: var(--pf-global--spacer--lg); | ||
} | ||
|
||
} |
24 changes: 24 additions & 0 deletions
24
frontend/packages/console-shared/src/components/layout/PageLayout.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import * as React from 'react'; | ||
import { Text } from '@patternfly/react-core'; | ||
|
||
import './PageLayout.scss'; | ||
|
||
type PageLayoutProps = { | ||
children: React.ReactNode; | ||
title: React.ReactNode; | ||
hint?: React.ReactNode; | ||
}; | ||
|
||
const PageLayout: React.FC<PageLayoutProps> = ({ children, title, hint }) => ( | ||
<> | ||
<div className="ocs-page-layout__header"> | ||
<Text component="h1" className="ocs-page-layout__title"> | ||
{title} | ||
</Text> | ||
{hint && <div className="ocs-page-layout__hint">{hint}</div>} | ||
</div> | ||
<div className="ocs-page-layout__content">{children}</div> | ||
</> | ||
); | ||
|
||
export default PageLayout; |
1 change: 1 addition & 0 deletions
1
frontend/packages/console-shared/src/components/layout/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as PageLayout } from './PageLayout'; |
22 changes: 0 additions & 22 deletions
22
frontend/packages/dev-console/src/components/EmptyState.scss
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters