How to use the @storybook/addon-viewport.INITIAL_VIEWPORTS.responsive function in @storybook/addon-viewport

To help you get started, we’ve selected a few @storybook/addon-viewport 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 dfee / rbx / docs / stories / .config / config.ts View on Github external
addDecorator(withInfo());

setOptions({
  name: "👟 rbx - Bulma UI",
  showAddonPanel: true,
  url: "https://github.com/dfee/rbx",
});

addDecorator(withKnobs);

configureViewport({
  defaultViewport: "responsive",
  viewports: {
    // tslint:disable:object-literal-sort-keys
    responsive: INITIAL_VIEWPORTS.responsive,
    mobileSmall: {
      name: "Mobile @ 480px",
      styles: {
        width: "480px",
      },
    },
    mobileMax: {
      name: "Mobile @ 768px (max)",
      styles: {
        width: "768px",
      },
    },
    tabletMin: {
      name: "Tablet @ 769px (min)",
      styles: {
        width: "769px",

@storybook/addon-viewport

Build responsive components by adjusting Storybook’s viewport size and orientation

MIT
Latest version published 16 hours ago

Package Health Score

95 / 100
Full package analysis