Git Product home page Git Product logo

Comments (5)

shilman avatar shilman commented on May 9, 2024

This would be awesome! Currently Story blocks only get recognized under Preview blocks specifically, so we’d need to fix that for that part of your proposal to work. But having a Figma block would be amazing. How quickly could you turn that around? I want to do a post promoting DocBlocks as part of the 6.0 release, and would love to include that.

from addon-designs.

pocka avatar pocka commented on May 9, 2024

Currently Story blocks only get recognized under Preview blocks specifically, so we’d need to fix that for that part of your proposal to work.

I think it's not such problematic, just designing Blocks to keep <Preview><Story> structure would be enough IMO.

// something like this?
<WithDesign figma="https://www.figma.com/file/Klm6pxIZSaJFiOMX5FpTul9F/storybook-addon-designs-sample">
  <Preview>
    <Story>
      <Button>Button</Button>
    </Story>
  </Preview>
</WithDesign>

If everything goes well, especially the theming and styling stuff, I can release (alpha, beta, or stable IDK) this feature within a week.

from addon-designs.

shilman avatar shilman commented on May 9, 2024

No. Story needs to be either at the top level or directly below Preview at the top level. It’s kind of an arbitrary requirement... nothing fundamental. But would require a chance to Storybook to support your proposal. Maybe start with the Figma and other standalone blocks and do the composite ones in SB 6.1?

from addon-designs.

shilman avatar shilman commented on May 9, 2024

If you just want to annotate Story with design info you can use parameters:

<Story name=“foo” parameters={{ design: { ... }}}>...</Story>

from addon-designs.

pocka avatar pocka commented on May 9, 2024

No. Story needs to be either at the top level or directly below Preview at the top level. It’s kind of an arbitrary requirement... nothing fundamental. But would require a chance to Storybook to support your proposal. Maybe start with the Figma and other standalone blocks and do the composite ones in SB 6.1?

Oh... so is it better to ship only embed components (e.g. <Figma>, <Pdf>) and defer the tabbed-preview feature? TBH, the tabbed-preview feature is just an early idea and I'm not sure whether that is needed... Supporting non-top-level <Preview> sounds good but it will bring complexity in story parsing, so discussing carefully after a user submits a feature request is okay and keeps things simple 👍

from addon-designs.

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.