Zuehlke / design-system-starter

https://zuehlke.github.io/design-system-starter/
MIT License
11 stars 1 forks source link

figma | embed Storybook stories #28

Open culas opened 6 months ago

culas commented 6 months ago

evaluate and test the official integration of Storybook stories inside Figma: https://storybook.js.org/docs/sharing/design-integrations#embed-storybook-in-figma-with-the-plugin

hitschman commented 6 months ago

what ChatGPT says about Figma URLs: In Figma, you can indeed generate URLs to specific selections (objects) within your designs. The structure of the URL and its parameters in Figma typically follows this format:

https://www.figma.com/file/{file_key}/{file_name}?node-id={node_id}

Here's what each part represents:

So, when you want to generate a URL to share a specific selection (object) in Figma, you need to replace {file_key} with the unique identifier of your Figma file, and {node_id} with the unique identifier of the selected object.

For example:

tps://www.figma.com/file/abc123/my-designs?node-id=456:789

In this URL:

This URL will take anyone who clicks on it directly to the specified object within the Figma file. This URL is just an example and doesn't work

hitschman commented 6 months ago

What can we do? (proposal)

If someone uses design-system-starter, only the `{file-key}? has to be modified to match the own Figma Design-System file.

Here some example:

As you can see the {node-id} remains the same and only the {file_key} is different.

hitschman commented 6 months ago

@storybook/addon-designs added to branch: https://github.com/Zuehlke/design-system-starter/tree/29-figma---use-figma-variables-instead-of-color-styles

Open point: Add Figma file-id to a variable and used it in Storybook stories.