Skip to content

Commit

Permalink
Merge pull request #189 from dotkom/no-import-in-global-style
Browse files Browse the repository at this point in the history
No import in global style
  • Loading branch information
FluidSense committed Oct 9, 2020
2 parents 0eff4f5 + 16c4b43 commit 5cd8922
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 4 deletions.
22 changes: 21 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion package.json
Expand Up @@ -76,6 +76,10 @@
"@storybook/addons": "^5.3.12",
"@storybook/react": "^5.3.12",
"@storybook/source-loader": "^5.3.12",
"@types/lodash": "^4.14.161"
"@types/lodash": "^4.14.161",
"fontsource-material-icons": "^3.0.2",
"fontsource-source-code-pro": "^3.0.10",
"fontsource-source-sans-pro": "^3.0.9",
"fontsource-source-serif-pro": "^3.0.10"
}
}
7 changes: 6 additions & 1 deletion src/common/global.ts
@@ -1,10 +1,15 @@
import { createGlobalStyle } from 'styled-components';
import Reset from './reset';
import { media, breakPointsInPX } from './layout';
import 'fontsource-material-icons/outlined.css';
import 'fontsource-source-sans-pro/300.css';
import 'fontsource-source-sans-pro/400.css';
import 'fontsource-source-sans-pro/700.css';
import 'fontsource-source-serif-pro';
import 'fontsource-source-code-pro';

export const GlobalStyle = createGlobalStyle`
${Reset}
@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700|Source+Serif+Pro|Source+Code+Pro|Material+Icons+Outlined');
body {
font-family: 'Source Sans Pro', sans-serif;
Expand Down
2 changes: 1 addition & 1 deletion src/components/icon/Icon.tsx
Expand Up @@ -14,7 +14,7 @@ const StyledIcon = styled.i`

const Icon = ({ name, className = '', ...props }: IconProps) => {
return (
<StyledIcon className={`material-icons-outlined ${className}`} {...props}>
<StyledIcon className={`material-icons ${className}`} {...props}>
{name}
</StyledIcon>
);
Expand Down

0 comments on commit 5cd8922

Please sign in to comment.