This repository has been archived by the owner on Mar 1, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 546
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #260 from alanbueno/feat/optional-header-alignment
feat(*): Add SiteHeader center alignment capability
- Loading branch information
Showing
3 changed files
with
24 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
@charset "UTF-8"; | ||
/** | ||
Container customization | ||
*/ | ||
|
||
.container.center { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} |
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,13 +1,18 @@ | ||
// @flow | ||
|
||
import * as React from "react"; | ||
import cn from "classnames"; | ||
|
||
import "./Container.css"; | ||
|
||
type Props = {| | ||
+children?: React.Node, | ||
+className?: string, | ||
|}; | ||
|
||
function Container(props: Props): React.Node { | ||
return <div className={"container"}>{props.children}</div>; | ||
function Container({ className, children }: Props): React.Node { | ||
const classes = cn("container", className); | ||
return <div className={classes}>{children}</div>; | ||
} | ||
|
||
export default Container; |
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