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

To help you get started, we’ve selected a few @storybook/angular 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 marklogic / marklogic-data-hub / quick-start / .storybook / config.js View on Github external
/**
   * id to select an addon panel
   * @type {String}
   */
  selectedAddonPanel: undefined, // The order of addons in the "Addon panel" is the same as you import them in 'addons.js'. The first panel will be opened by default as you run Storybook
});


// automatically import all files ending in *.stories.ts
const req = require.context('../src/main/ui/app', true, /.stories.ts$/);

function loadStories() {
  req.keys().forEach(filename => req(filename));
}

configure(loadStories, module);
github carbon-design-system / carbon-charts / packages / angular / .storybook / config.js View on Github external
panelPosition: 'bottom',
  showDownPanel: true
});

// load global styles
require("!style-loader!css-loader!sass-loader!./previews.scss");
require("!style-loader!css-loader!@carbon/charts/dist/styles.css");

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

configure(loadStories, module);
github storybookjs / storybook / lib / cli / generators / ANGULAR / template-mdx / .storybook / config.js View on Github external
import { configure } from '@storybook/angular';

// automatically import all files ending in *.stories.ts
configure(require.context('../src/stories', true, /\.stories\.(ts|mdx)$/), module);
github storybookjs / storybook / lib / cli / generators / ANGULAR / template-csf / .storybook / config.js View on Github external
import { configure } from '@storybook/angular';

// automatically import all files ending in *.stories.ts
configure(require.context('../src/stories', true, /\.stories\.ts$/), module);
github nitsnets / unicorn_components / demo / config.js View on Github external
/* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions */

import {
    configure,
    addDecorator
} from '@storybook/angular';

// automatically import all files ending in *.demo.ts
const req = require.context('.', true, /.demo.ts$/);

function loadStories() {
    req.keys().forEach((filename) => req(filename));
}

configure(loadStories, module);
github urish / bigtsquery / .storybook / config.js View on Github external
import { configure } from '@storybook/angular';

function loadStories() {
  require('../src/app/error-message/error-message.stories');
  require('../src/app/search-result/search-result.stories');
  require('../src/app/search-results/search-results.stories');
}

configure(loadStories, module);
github makimenko / angular-template-for-threejs / .storybook / config.js View on Github external
}

addParameters({
  options: {
    fullScreen: true,
    panelPosition: 'bottom',
    sidebarAnimations: false,
    enableShortcuts: true,
    isToolshown: true,
    theme: undefined,
    brandTitle: 'Angular Template for Threejs',
    brandUrl: 'https://github.com/makimenko/angular-template-for-threejs'
  },
});

configure(loadStories, module);
github carbon-design-system / carbon-custom-elements / .storybook / angular / 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\-angular\.[jt]s$/);
configure(req, module);
github tinymce / tinymce-angular / .storybook / config.js View on Github external
import { configure, addDecorator } from '@storybook/angular';
import { withNotes } from '@storybook/addon-notes';

addDecorator(withNotes);
function loadStories() {
  require('../stories/index.ts');
}

configure(loadStories, module);
github Verseghy / website_frontend / .storybook / config.js View on Github external
import { configure } from '@storybook/angular';
import '!style-loader!css-loader!sass-loader!@angular-mdc/theme/material.scss';

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

configure(loadStories, module);

@storybook/angular

Storybook for Angular: Develop Angular components in isolation with hot reloading.

MIT
Latest version published 17 days ago

Package Health Score

98 / 100
Full package analysis