-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into alec/TFAC-612
- Loading branch information
Showing
8 changed files
with
5,224 additions
and
478 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,5 +23,7 @@ | |
"regenerator": true | ||
} | ||
], | ||
["@babel/plugin-proposal-class-properties"], | ||
["react-require"], | ||
] | ||
} |
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 |
---|---|---|
|
@@ -10,4 +10,7 @@ yarn-error.log | |
coverage | ||
.env | ||
.yalc | ||
yalc.lock | ||
yalc.lock | ||
|
||
# Storybook | ||
build-storybook.log |
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,14 @@ | ||
module.exports = { | ||
"stories": [ | ||
"../src/**/*.stories.mdx", | ||
"../src/**/*.stories.@(js|jsx|ts|tsx)" | ||
], | ||
"addons": [ | ||
"@storybook/addon-links", | ||
"@storybook/addon-essentials", | ||
"storybook-addon-gatsby", | ||
], | ||
"core": { | ||
"builder": "webpack5" | ||
} | ||
} |
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,27 @@ | ||
import { ThemeProvider } from '@material-ui/core/styles' | ||
import { action } from "@storybook/addon-actions" | ||
import theme from 'src/themes/theme' | ||
|
||
// Gatsby's Link overrides: | ||
// Gatsby Link calls the `enqueue` & `hovering` methods on the global variable ___loader. | ||
// This global object isn't set in storybook context, requiring you to override it to empty functions (no-op), | ||
// so Gatsby Link doesn't throw errors. | ||
global.___loader = { | ||
enqueue: () => {}, | ||
hovering: () => {}, | ||
} | ||
// This global variable prevents the "__BASE_PATH__ is not defined" error inside Storybook. | ||
global.__BASE_PATH__ = "/" | ||
// Navigating through a gatsby app using gatsby-link or any other gatsby component will use the `___navigate` method. | ||
// In Storybook, it makes more sense to log an action than doing an actual navigate. Check out the actions addon docs for more info: https://storybook.js.org/docs/react/essentials/actions | ||
window.___navigate = pathname => { | ||
action("NavigateTo:")(pathname) | ||
} | ||
|
||
export const decorators = [ | ||
(Story) => ( | ||
<ThemeProvider theme={theme}> | ||
<Story /> | ||
</ThemeProvider> | ||
), | ||
] |
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,2 @@ | ||
ignore: | ||
- "**/*.stories.jsx" |
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,17 @@ | ||
import Header from './Header' | ||
|
||
export default { | ||
title: 'Components/Header', | ||
component: Header, | ||
} | ||
|
||
const Template = (args) => <Header {...args} /> | ||
export const standard = Template.bind({}) | ||
standard.args = { | ||
brand: 'tab', | ||
} | ||
|
||
export const full = Template.bind({}) | ||
full.args = { | ||
brand: 'search', | ||
} |
Oops, something went wrong.