Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:component options for each component in sets #1

Merged
merged 1 commit into from
Jan 30, 2023

Conversation

YasielCabrera
Copy link
Owner

Allow adding custom options/styles to the Figma image and the story component. The options can also be added by component in the component sets.

This is possible now:

Primary.parameters = {
  figma: {
    component: {
        0: "https://www.figma.com/file/ZZZ/file-name?node-id=XXX%3AYYY",
        768: {
          fileId: "ZZZ",
          nodeId: "XXX:YYY"
         },
        1440: {
           // the component can be a string or a FigmaComponentNode like `node1` or `node2`
           component: "https://www.figma.com/file/ZZZ/file-name?node-id=XXX%3AYYY",
           // this options will override the component `options`
           options: {
             style: {
               // figma component options
               padding: 12,
             },
             componentStyle: {
               // story component options. This way you can set a fixed width to match exactly with the Figma image
               width: 650,
             },
           }
         }
    }
  },
};

Copy link
Collaborator

@alejandrocabriales alejandrocabriales left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alejandrocabriales alejandrocabriales merged commit e3df4a8 into main Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants