Closed alisonjoseph closed 1 month ago
https://github.com/figma/code-connect/blob/main/cli/README.md#integrating-with-storybook Do we want this? Or do we want to keep config files separate? Requires:
import React from 'react'; import figma from '@figma/code-connect'; import { ArrowRight } from '@carbon/icons-react'; import Link from './Link'; import mdx from './Link.mdx'; export default { title: 'Components/Link', component: Link, parameters: { docs: { page: mdx, }, design: { type: 'figma', url: 'https://www.figma.com/file/YAnB1jKx0yCUL29j6uSLpg/(v11)-All-themes---Carbon-Design-System?type=design&node-id=50111-991&mode=design&t=kyFCPK0tCeufcNP2-4', examples: [FigmaTest], props: { inline: figma.boolean('Inline'), children: figma.string('Link text'), renderIcon: figma.instance('Swap icon'), size: figma.enum('Size', { Large: 'lg', Medium: 'md', Small: 'sm', }), disabled: figma.enum('State', { Disabled: true, }), }, }, }, args: { disabled: false, inline: false, visited: false, children: 'Link', }, argTypes: { children: { table: { disable: true, }, }, as: { control: false, }, renderIcon: { table: { disable: true, }, }, }, }; export const FigmaTest = ({ size, disabled, inline, renderIcon, children }) => ( <Link inline={inline} disabled={disabled} renderIcon={renderIcon} size={size} href="#"> {children} </Link> );
I'm down to try it out. Not sure if it'll require doing #16468 first
Integrate Code Connect with Storybook
https://github.com/figma/code-connect/blob/main/cli/README.md#integrating-with-storybook Do we want this? Or do we want to keep config files separate? Requires:
Pro
Con
Example integrated storybook code