-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Storybook setup Storybook can be started using `npm run storybook` * moved files and bugfix Moved component files into their own directory and moved stories next to them. Fixed a bug with loading images * prettier and bugfix * prettier and bugfix * Absolute Import in Header.tsx * import fix some imports did not work after merging * Storybook update for chakra ui to properly work * Prettier main.js * comment in preview.js about hacky solution * webpack final update and prettier update to preview * Updated website/readme to include storybook description * prettier... * Delete docker-compose 2.yaml
- Loading branch information
1 parent
a4e5f56
commit cb317eb
Showing
15 changed files
with
35,170 additions
and
8,772 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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
const path = require("path"); | ||
|
||
module.exports = { | ||
stories: [ | ||
"../src/components/**/*.stories.mdx", | ||
"../src/components/**/*.stories.@(js|jsx|ts|tsx)", | ||
], | ||
addons: [ | ||
"@storybook/addon-links", | ||
"@storybook/addon-essentials", | ||
"@storybook/addon-interactions", | ||
"@chakra-ui/storybook-addon", | ||
], | ||
framework: "@storybook/react", | ||
core: { | ||
builder: "@storybook/builder-webpack5", | ||
}, | ||
staticDirs: ["../public"], | ||
// https://github.com/storybookjs/storybook/issues/15336#issuecomment-888528747 | ||
typescript: { reactDocgen: false }, | ||
// fix to make absolute imports working in storybook | ||
webpackFinal: async (config, { configType }) => { | ||
config.resolve.alias = { | ||
...config.resolve.alias, | ||
src: path.resolve(__dirname, "../src"), | ||
}; | ||
return config; | ||
}, | ||
features: { | ||
emotionAlias: false, | ||
}, | ||
}; |
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,22 @@ | ||
import "!style-loader!css-loader!postcss-loader!tailwindcss/tailwind.css"; | ||
|
||
export const parameters = { | ||
actions: { argTypesRegex: "^on[A-Z].*" }, | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/, | ||
}, | ||
}, | ||
}; | ||
|
||
// Hacky solution to get Images in next to work | ||
// https://dev.to/jonasmerlin/how-to-use-the-next-js-image-component-in-storybook-1415 | ||
import * as NextImage from "next/image"; | ||
|
||
const OriginalNextImage = NextImage.default; | ||
|
||
Object.defineProperty(NextImage, "default", { | ||
configurable: true, | ||
value: (props) => <OriginalNextImage {...props} unoptimized />, | ||
}); |
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
Oops, something went wrong.