-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…and-theme-setup Base Style & Theme Setup
- Loading branch information
Showing
18 changed files
with
563 additions
and
31 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -9,15 +9,40 @@ | |
|
||
import React, { Fragment } from "react"; | ||
import PropTypes from "prop-types"; | ||
import { ThemeProvider, createGlobalStyle } from "styled-components"; | ||
import modernNormalize from "styled-modern-normalize"; | ||
|
||
import theme, { globals, normalize } from "styles/theme"; | ||
|
||
import "inter-ui/inter-ui.css"; | ||
import "typeface-rubik/index.css"; | ||
import "typeface-source-code-pro/index.css"; | ||
|
||
/** | ||
* A React component that injects global CSS inline styles in page headers. | ||
* | ||
* @see https://www.styled-components.com/docs/api#createglobalstyle | ||
* @since 0.2.0 | ||
*/ | ||
const GlobalStyle = createGlobalStyle` | ||
${modernNormalize}; | ||
${globals}; | ||
${normalize}; | ||
`; | ||
|
||
/** | ||
* The root container. | ||
* The root container with injected global CSS styles. | ||
* | ||
* @author Arctic Ice Studio <[email protected]> | ||
* @author Sven Greb <[email protected]> | ||
* @since 0.1.0 | ||
*/ | ||
const Root = ({ children }) => <Fragment>{children}</Fragment>; | ||
const Root = ({ children }) => ( | ||
<Fragment> | ||
<GlobalStyle /> | ||
<ThemeProvider theme={theme}>{children}</ThemeProvider> | ||
</Fragment> | ||
); | ||
|
||
Root.propTypes = { | ||
children: PropTypes.node.isRequired | ||
|
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 +1,10 @@ | ||
/* | ||
* Copyright (C) 2018-present Arctic Ice Studio <[email protected]> | ||
* Copyright (C) 2018-present Sven Greb <[email protected]> | ||
* | ||
* Project: Nord Docs | ||
* Repository: https://github.com/arcticicestudio/nord-docs | ||
* License: MIT | ||
*/ | ||
|
||
export { default } from "./Root"; |
Oops, something went wrong.