code-connect
code-connect copied to clipboard
Connecting multiple stories in one file to multiple Figma components
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.
Any news on this? @karlpetersson