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

Connecting multiple stories in one file to multiple Figma components #35

Open
efoken opened this issue Apr 26, 2024 · 0 comments
Open

Comments

@efoken
Copy link

efoken commented Apr 26, 2024

It would be super helpful, when it would be possible to connect multiple stories in one Storybook file, to different Figma components. Because we do not always have one component that maps to one Figma component, sometimes there are different Figma components but only one component in code, like in this example:

// TextInput.stories.tsx

export const Base: Story = {
  render: (args) => <TextInput {...args} />,
  args: {
    helperText: 'Helper Text',
    label: 'Label',
    placeholder: 'Placeholder',
  },
  parameters: {
    design: {
      type: 'figma',
      url: 'https://...',
      // ...
    },
  },
};

export const Multiline: Story = {
  render: (args) => <TextInput {...args} />,
  args: {
    helperText: 'Helper Text',
    label: 'Label',
    maxRows: 4,
    minRows: 2,
    multiline: true,
  },
  parameters: {
    design: {
      type: 'figma',
      url: 'https://...',
      // ...
    },
  },
};

In Figma we have a TextInput component and a TextArea component, but in React Native code both are the same component.

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

No branches or pull requests

1 participant