Created
December 30, 2019 10:06
-
-
Save Vivek205/a082435653789ae3bfb3d27355f49ab1 to your computer and use it in GitHub Desktop.
Storybook Config
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
import "storybook-addon-react-live-edit/dist/register"; |
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
import { configure, setAddon } from "@storybook/react"; | |
import LiveEdit, { setOptions } from "storybook-addon-react-live-edit"; | |
// React-live-edit | |
setOptions({ theme: "darcula", presets: ["react"], enableShortcuts: false }); | |
setAddon(LiveEdit); | |
// automatically import all files ending in *.stories.js | |
const req = require.context("../src", true, /\.stories\.js$/); | |
function loadStories() { | |
req.keys().forEach(filename => req(filename)); | |
} | |
configure(loadStories, module); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment