figma / code-connect

A tool for connecting your design system components in code with your design system in Figma
MIT License
816 stars 60 forks source link

Figma Connect - Multiple Component Connect with Storybook approach #75

Open vchandran8 opened 2 months ago

vchandran8 commented 2 months ago

I see the figma documentation covering details for connecting single React Code Component to Multiple Figma Component sets with Figma.tsx file approach.

I can have multiple figma.connect calling with each specific figma URL to component or component Set.

For the same use case, how it can be implemented with STORBOOK story file approach?? Please share the details & examples for that.

Since storybook has only one Export Default with only one Design Parameter URL can be accepted.

For Ex :

export default {
    component: sampleComponent,
    parameters: {
        design: {
            type: 'figma',
            url: '//IT CAN HOLD ONLY ONE URL',
            examples: [FigmaTemplate],
            props: {
              //PROPS
            }
        },
    },
    argTypes: {
        onClick: {
            table: {
                category: 'Events',
            },
        },
    },
} as ComponentMeta<typeof SampleComponent>;

@tomduncalf-figma

efoken commented 2 months ago

Duplicate of https://github.com/figma/code-connect/issues/35