Skip to content

Commit

Permalink
Move root styles to wrapper layout component
Browse files Browse the repository at this point in the history
  • Loading branch information
aswallace committed May 21, 2024
1 parent b3c13e4 commit 9164470
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 34 deletions.
11 changes: 0 additions & 11 deletions packages/web/src/components/Home/Home.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,6 @@
position: relative;
}

.root {
background-color: var(--secondary-dark);
color: var(--secondary-text-color);
margin: 0;
border: 0;
width: 100%;
height: 100%;
overflow-y: auto;
justify-content: center;
}

.content {
padding: calc(4*var(--margin));
max-width: 1200px;
Expand Down
40 changes: 19 additions & 21 deletions packages/web/src/components/Home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,27 +50,25 @@ export default function Home() {
];
return (
<>
<div className={styles.root}>
<Banner />
<div className={styles.content}>
<div className={styles.header}>
Discover features to improve efficiency in dataset curation
</div>
<Features />
<hr></hr>
<div className={styles.optionsContainer}>
<div className={styles.header}>What would you like to access today?</div>
<div className={styles.options}>
{options.map((option, index) => {
return (
<div className={styles.option} key={`option_${index}`}>
<div className={styles.optionHeader}>{option.header}</div>
<div className={styles.optionBody}>{option.body}</div>
{option.action}
</div>
);
})}
</div>
<Banner />
<div className={styles.content}>
<div className={styles.header}>
Discover features to improve efficiency in dataset curation
</div>
<Features />
<hr></hr>
<div className={styles.optionsContainer}>
<div className={styles.header}>What would you like to access today?</div>
<div className={styles.options}>
{options.map((option, index) => {
return (
<div className={styles.option} key={`option_${index}`}>
<div className={styles.optionHeader}>{option.header}</div>
<div className={styles.optionBody}>{option.body}</div>
{option.action}
</div>
);
})}
</div>
</div>
</div>
Expand Down
10 changes: 10 additions & 0 deletions packages/web/src/components/Layout/Layout.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.root {
background-color: var(--secondary-dark);
color: var(--secondary-text-color);
margin: 0;
border: 0;
width: 100%;
height: 100%;
overflow-y: auto;
justify-content: center;
}
5 changes: 3 additions & 2 deletions packages/web/src/components/Layout/index.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import * as React from "react";
import { Outlet } from "react-router-dom";
import Header from "../Header";
import styles from "./Layout.module.css";

// Basic wrapper to maintain global header
export default function Layout() {
return (
<>
<div className={styles.root}>
<Header />
<Outlet />
</>
</div>
);
}

0 comments on commit 9164470

Please sign in to comment.