-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- pass layout components as props to Main and Article components - rearrange where footer is displayed based on width - remove extra right padding from AnchorButton with external icon - prevent RadioSet options from wrapping
- Loading branch information
Showing
11 changed files
with
174 additions
and
123 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,26 @@ | ||
import { FunctionComponent } from "react"; | ||
import { FunctionComponent, ReactNode } from "react"; | ||
|
||
import typography from "../typography/typography.module.css"; | ||
import styles from "./article.module.css"; | ||
|
||
export const Article: FunctionComponent = ({ children, ...props }) => { | ||
export const Article: FunctionComponent<{ | ||
aside?: ReactNode; | ||
footer?: ReactNode; | ||
header?: ReactNode; | ||
floatingActionButton?: ReactNode; | ||
}> = ({ aside, children, floatingActionButton, footer, header, ...props }) => { | ||
const className = [styles.article, typography.bodyMedium].join(" "); | ||
|
||
return ( | ||
<article className={className} {...props}> | ||
{children} | ||
{header} | ||
<div className={styles.body} role="presentation"> | ||
{children} | ||
{footer /* 600px and up */} | ||
{floatingActionButton} | ||
</div> | ||
{aside} | ||
{footer /* < 600px */} | ||
</article> | ||
); | ||
}; |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,18 @@ | ||
import { FunctionComponent } from "react"; | ||
import { FunctionComponent, ReactNode } from "react"; | ||
|
||
import styles from "./main.module.css"; | ||
|
||
export const Main: FunctionComponent = ({ children, ...props }) => ( | ||
export const Main: FunctionComponent<{ | ||
aside?: ReactNode; | ||
footer?: ReactNode; | ||
header?: ReactNode; | ||
navigation?: ReactNode; | ||
}> = ({ children, header, navigation, ...props }) => ( | ||
<main className={styles.main} {...props}> | ||
{children} | ||
{header} | ||
{navigation} | ||
<div className={styles.body} role="presentation"> | ||
{children} | ||
</div> | ||
</main> | ||
); |
Oops, something went wrong.