Giter Club home page Giter Club logo

Comments (4)

wadackel avatar wadackel commented on May 22, 2024

Hi @gcazaciuc, That makes sense.
I will try to correspond with the next version 👍

from storycap.

wadackel avatar wadackel commented on May 22, 2024

Hi @gcazaciuc.
Release version 0.4.0 which supports addDecorator.
Please check when you have time 😃

from storycap.

gcazaciuc avatar gcazaciuc commented on May 22, 2024

It works really nice, thanks for the hard work and effort you've put into this. The only case where i found it didn't work is when the stories were generated dynamically:

Below code doesn't work:

Utils.devices({ position: 'relative' }).forEach(device =>
    (storiesOf('sticky-button', module))
        .addDecorator(withReadme(README))
        .addDecorator(checkA11y)
        .addDecorator(withCode(style, 'sass'))
        .addDecorator(withScreenshot())
        .add(`StickyCart for  ${device.deviceName}`, () => (
            Utils.CombinationRenderer(StickyButton, props, device.style)
        )));

Below code does work:

Utils.devices({ position: 'relative' }).forEach(device =>
    (storiesOf('sticky-button', module))
        .addDecorator(withReadme(README))
        .addDecorator(checkA11y)
        .addDecorator(withCode(style, 'sass'))
        .add(`StickyCart for  ${device.deviceName}`, withScreenshot()(() => (
            Utils.CombinationRenderer(StickyButton, props, device.style)
        ))));

Notice in the working example that the dynamically generated story is wrapped in a withScreenshot call as opposed in setting a decorator.

It's not a big deal and i believe we can live without it if it's hard to fix. The normal stories work just fine using addDecorator

from storycap.

wadackel avatar wadackel commented on May 22, 2024

@gcazaciuc Thanks for confirmation!
Since it does not seem to be a big problem, I would like to prioritize implementation of new functions 👍

from storycap.

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.