How to use the @storybook/polymer.configure function in @storybook/polymer

To help you get started, we’ve selected a few @storybook/polymer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github storybookjs / storybook / lib / cli / generators / POLYMER / template-csf / .storybook / config.js View on Github external
import { configure } from '@storybook/polymer';

// automatically import all files ending in *.stories.js
configure(require.context('../src/stories', true, /\.stories\.js$/), module);
github zazuko / openlayers-elements / .storybook / config.js View on Github external
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);
github nuxeo / nuxeo-elements / storybook / .storybook / config.js View on Github external
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);
github web-padawan / aybolit / packages / storybook / .storybook / config.js View on Github external
import { configure } from '@storybook/polymer';

function loadStories() {
  const req = require.context('../', true, /\.stories\.js$/);
  req.keys().forEach(filename => req(filename));
}

configure(loadStories, module);
github elmsln / WCFactory / packages / generator-wcfactory / generators / factory / templates / storybook / config.js View on Github external
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);
github uprtcl / js-uprtcl / modules / evees / .storybook / config.js View on Github external
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);
github open-wc / open-wc / packages / demoing-storybook / demo / .storybook / config.js View on Github external
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);
github carbon-design-system / carbon-custom-elements / .storybook / config.ts View on Github external
}
    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();
  });
}
github elmsln / lrnwebcomponents / .storybook / config.js View on Github external
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);

@storybook/polymer

Storybook for Polymer: Develop Polymer components in isolation with Hot Reloading.

MIT
Latest version published 4 years ago

Package Health Score

67 / 100
Full package analysis