-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DEVPROD-5139: Combine Storybook config #172
Changes from 11 commits
33628a8
6d08e86
ca8c30a
e924fa8
683abfa
b2cd4e3
4a1a696
95985ae
326d4b6
9325505
4e938b8
111f331
2c8a5f4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,7 @@ node_modules | |
|
||
# artifacts | ||
bin | ||
build | ||
dist | ||
coverage | ||
storybook-static |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Evergreen UI Storybook |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
export default { | ||
addons: ["@evg-ui/storybook-addon"], | ||
stories: ["./README.mdx"], | ||
framework: { | ||
name: "@storybook/react-vite", | ||
}, | ||
refs: { | ||
lib: { | ||
title: "Evergreen UI Library", | ||
url: "http://localhost:6008", | ||
}, | ||
parsley: { | ||
title: "Parsley", | ||
url: "http://localhost:6007", | ||
}, | ||
spruce: { | ||
title: "Spruce", | ||
url: "http://localhost:6006", | ||
}, | ||
}, | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,6 @@ | ||
// eslint-disable-next-line import/no-import-module-exports | ||
import type { StorybookConfig } from "@storybook/react-vite"; | ||
|
||
const config: StorybookConfig = { | ||
stories: ["../src/**/*.stories.@(js|jsx|ts|tsx)"], | ||
addons: [ | ||
"@storybook/addon-essentials", | ||
"@storybook/addon-interactions", | ||
"@storybook/addon-links", | ||
"storybook-addon-apollo-client", | ||
], | ||
export default { | ||
addons: ["@evg-ui/storybook-addon"], | ||
framework: { | ||
name: "@storybook/react-vite", | ||
options: {}, | ||
}, | ||
docs: { | ||
autodocs: true, | ||
}, | ||
}; | ||
|
||
// storybook/addon-storyshots does not support es6 module exports so we must use commonjs | ||
// https://github.com/storybookjs/storybook/issues/20814 | ||
module.exports = config; |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,8 +10,7 @@ const resetStyles = css` | |
} | ||
`; | ||
|
||
const globalStyles = css` | ||
${fontStyles} | ||
export const globalStyles = css` | ||
${resetStyles} | ||
background-color: white; | ||
body { | ||
|
@@ -32,6 +31,13 @@ const globalStyles = css` | |
} | ||
`; | ||
|
||
const GlobalStyles = () => <Global styles={globalStyles} />; | ||
const GlobalStyles = () => ( | ||
<Global | ||
styles={css` | ||
${fontStyles} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can this fontStyles be deleted because of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This GlobalStyles component is only used by the application itself, not Storybook, so removing these |
||
${globalStyles} | ||
`} | ||
/> | ||
); | ||
|
||
export default GlobalStyles; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to have 1 globalStyles for spruce and parsley?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes—but I think this is not too pertinent to Storybook actually and can be done as followup work for the shared library. I added a comment to DEVPROD-5148!