-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove node versions that we don't support * Add MUI and Emotion global styles support to Storybook * Add Button component * Change node version for github workflow
- Loading branch information
Showing
23 changed files
with
768 additions
and
80 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons|Roboto:300,400" /> | ||
<script src="https://kit.fontawesome.com/bcd6c71157.js" crossorigin="anonymous"></script> | ||
<style> | ||
#root { | ||
transform: translateX(0); | ||
} | ||
</style> |
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,5 +1,33 @@ | ||
import React from 'react'; | ||
import { Global, css } from '@emotion/react'; | ||
import { muiTheme, globalStyles } from '../'; | ||
import { StylesProvider, ThemeProvider as MuiThemeProvider } from '@material-ui/styles'; | ||
import { CssBaseline } from '@material-ui/core'; | ||
|
||
// https://storybook.js.org/docs/react/writing-stories/parameters#global-parameters | ||
export const parameters = { | ||
// https://storybook.js.org/docs/react/essentials/actions#automatically-matching-args | ||
actions: { argTypesRegex: '^on.*' }, | ||
options: { | ||
// Order stories in alphabetical order | ||
storySort: (a, b) => (a[1].kind === b[1].kind ? 0 : a[1].id.localeCompare(b[1].id, undefined, { numeric: true })), | ||
}, | ||
}; | ||
|
||
// https://storybook.js.org/docs/react/writing-stories/decorators#global-decorators | ||
export const decorators = [ | ||
(Story) => ( | ||
// injects MUI styles first, so emotion styles will override them | ||
<StylesProvider injectFirst> | ||
<MuiThemeProvider theme={muiTheme}> | ||
<Global | ||
styles={css` | ||
${globalStyles} | ||
`} | ||
/> | ||
<CssBaseline /> | ||
<Story /> | ||
</MuiThemeProvider> | ||
</StylesProvider> | ||
), | ||
]; |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.