Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { configure } from '@storybook/polymer';
// automatically import all files ending in *.stories.js
configure(require.context('../src/stories', true, /\.stories\.js$/), module);
import { setOptions } from '@storybook/addon-options';
import '@storybook/addon-console';
addDecorator(withKnobs);
// automatically import all files ending in *.stories.js
const req = require.context('../stories', true, /.stories.js$/);
function loadStories() {
req.keys().forEach(filename => req(filename));
}
setOptions({
selectedAddonPanel: 'storybooks/storybook-addon-knobs',
});
configure(loadStories, module);
backgrounds: [
{ name: 'Default', value: '#f5f5f5' },
{ name: 'Dark', value: '#060826' },
{ name: 'Kawai', value: '#f8d3e0' },
{ name: 'Light', value: '#f7f7f7' },
],
options: { theme },
});
// automatically import all files ending in *.stories.js
const req = require.context('../src/elements', true, /.stories.js$/);
function loadStories() {
req.keys().forEach((filename) => req(filename));
}
configure(loadStories, module);
import { configure } from '@storybook/polymer';
function loadStories() {
const req = require.context('../', true, /\.stories\.js$/);
req.keys().forEach(filename => req(filename));
}
configure(loadStories, module);
import { configure } from "@storybook/polymer";
import { setOptions } from "@storybook/addon-options";
setOptions({
name: "lrnwebcomponents",
hierarchyRootSeparator: /\|/
});
const req = require.context("../elements", true, /\.story\.js$/);
function loadStories() {
req.keys().forEach(filename => req(filename));
}
configure(loadStories, module);
import { configure, addDecorator } from '@storybook/polymer';
import { withA11y } from '@storybook/addon-a11y';
import '@storybook/addon-console';
const req = require.context('../stories', true, /\.stories\.js$/);
function loadStories() {
req.keys().forEach(filename => req(filename));
}
addDecorator(withA11y);
configure(loadStories, module);
import { configure, addDecorator } from '@storybook/polymer';
import { withA11y } from '@storybook/addon-a11y';
import '@storybook/addon-console';
const req = require.context('../stories', true, /\.stories\.js$/);
function loadStories() {
req.keys().forEach(filename => req(filename));
}
addDecorator(withA11y);
configure(loadStories, module);
}
Object.keys(knobs).forEach(name => {
if (typeof knobs[name] === 'function') {
parameters.props[name] = knobs[name]();
}
});
}
return story();
});
addons.getChannel().on(CURRENT_THEME, theme => {
document.documentElement.setAttribute('storybook-carbon-theme', theme);
});
const req = require.context('../src/components', true, /\-story\.[jt]s$/);
configure(req, module);
if (module.hot) {
module.hot.accept(req.id, () => {
const currentLocationHref = window.location.href;
window.history.pushState(null, '', currentLocationHref);
window.location.reload();
});
}
import { configure } from "@storybook/polymer";
import { setOptions } from "@storybook/addon-options";
setOptions({
name: "lrnwebcomponents",
hierarchyRootSeparator: /\|/
});
const req = require.context("../elements", true, /\.story\.js$/);
function loadStories() {
req.keys().forEach(filename => req(filename));
}
configure(loadStories, module);