Skip to content

defaultViewport not working in 2.0-beta #285

@jowan

Description

@jowan

Describe the bug
defaultViewport as set in component story not respected.

To Reproduce
Steps to reproduce the behavior:

  1. Create a list of custom viewports in preview.jsx
  2. Create a component with its own stories.wingsuit.jsx
  3. Add a default viewport to parameters as described in the add-on's docs (and wingsuit 1x)

Expected behavior
When viewing the component - the default viewport is applied

Additional context
I spun up a clean version of the Tailwind starter kit 2.0-beta.
It has some custom viewports already defined in its preview.jsx.
I can not make Storybook apply the default viewport.
This worked fine in wingsuit 1x but it's not working now :(

This does raise the question - do parameters work at all ? maybe it is not just viewport, maybe its the parameters object.

For reference, this is what I am doing, and it does not work.

import './index';

const patternDefinition = require('./fieldset.wingsuit.yml');

export const wingsuit = {
  patternDefinition,
  parameters: {
    viewport: {
      defaultViewport: 'sm',
    },
  },
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions