-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(gatsby-theme-docz): create MainContainer component (#1381)
* feat: create a shadow-able MainContainer component
- Loading branch information
1 parent
65ebd37
commit e8d1c04
Showing
4 changed files
with
30 additions
and
18 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
12 changes: 12 additions & 0 deletions
12
core/gatsby-theme-docz/src/components/MainContainer/index.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** @jsx jsx */ | ||
import { jsx, Container } from 'theme-ui' | ||
|
||
import * as styles from './styles' | ||
|
||
export const MainContainer = ({ children, ...rest }) => { | ||
return ( | ||
<Container sx={styles.container} {...rest}> | ||
{children} | ||
</Container> | ||
) | ||
} |
15 changes: 15 additions & 0 deletions
15
core/gatsby-theme-docz/src/components/MainContainer/styles.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { media } from '~theme/breakpoints' | ||
|
||
export const container = { | ||
backgroundColor: 'background', | ||
position: 'relative', | ||
maxWidth: 960, | ||
py: 5, | ||
px: 4, | ||
variant: 'styles.Container', | ||
[media.tablet]: { | ||
py: 4, | ||
px: 4, | ||
pt: 5, | ||
}, | ||
} |