Created
November 25, 2020 23:07
-
-
Save kenakingkong/7247961935433431325b38d81f79472d to your computer and use it in GitHub Desktop.
excerpt from src/components/layout.js
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
// excerpt from src/components/layout.js | |
import { Media } from "../media" | |
... | |
<main> | |
{/* Tablet/Desktop */} | |
<Media greaterThan="sm"> | |
<div className="my-container"> | |
<BoxImage /> | |
<FluidGrid>{children}</FluidGrid> | |
<Name name={data.site.siteMetadata.name}/> | |
</div> | |
</Media> | |
{/* Mobile */} | |
<Media lessThan="md"> | |
{isHome && <BoxImage />} | |
{!isHome && <FluidGrid>{children}</FluidGrid>} | |
{isHome && <Name name={data.site.siteMetadata.name} />} | |
</Media> | |
</main> | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment