Git Product home page Git Product logo

Comments (3)

erzhtor avatar erzhtor commented on May 9, 2024

I'm not sure is it related, but I also faced problem while passing @storybook/addon-viewport parameters to .lokiSkip.

Example:

storiesOf('Card', module)
    .add('default', () => (
        <Card />
    ))
    .lokiSkip('iphone6', () => (
        <Card />
    ), { viewport: { defaultViewport: 'iphone6' }})

Parameters are not recognized and both use the same viewport. But using .add instead of .lokiSkip works as expected and sets viewport according to parameters.

from loki.

erzhtor avatar erzhtor commented on May 9, 2024

Any update there?

from loki.

Tobi-mmt avatar Tobi-mmt commented on May 9, 2024

I have the same problem. Are there any updates?

Setup

Node v12.16.2
Loki v0.22.1
Storybook v5.3.13
Storybook addons: docs, viewport

Example

storiesOf('Card', module)
    .addParameters({ component: Card })
    .add('default', () => (
        <Card />
    ))
    .lokiSkip('default2', () => (
        <Card />
    ))

What do I expect?

If I start storybook there should be two stories. If I go to the Docs tab in storybook there should be the documentation of all two stories, including the props list of the component on top and the code of each story visible next to each rendered story.
Cod button example in right bottom corner:
Bildschirmfoto 2020-07-01 um 09 07 05

What is really happening?

I can not see the code from the default2 story, but I can from the default story.
Code button:
Bildschirmfoto 2020-07-01 um 09 07 00

Suggestions

This looks like lokiSkip prevents some functionality of the add-ons.
It should be possible to pass the whole add function through the lokiSkip to prevent

from loki.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.