Releases: figma/code-connect
Releases · figma/code-connect
Code Connect 0.1.2
Fixed
- SwiftUI: Fix validation for boolean variants.
- React: Support for different types for each boolean value (Fixes #32).
- React: Allow props to be used as object values (Fixes #40).
- Storybook: Allow the Storybook meta default export to be a reference to another variable (Fixes #34).
- Documentation: Update README files to fix typos.
Added
- Storybook: Add source link to code snippets.
- React: Add a signature to
figma.connect
that excludes the component argument. This allows supporting code snippets that don't use React components, but rather native tags. - React: Support numbers in enums.
- SwiftUI: Implement
figmaApply
: a helper function that allows for selective showing & hiding of code based on whether a boolean mapping. - SwiftUI: Implement
hideDefault
: allows a user to specify properties in which the default values should be hidden. This can be seen as being used to represent a subset of what's provided byfigmaApply
.
Changed
- React: Update the folder structure in preparation for some future changes.
Code Connect 0.1.1
Fixed
- SwiftUI: Fixed issue with boolean prop rendering.
- React: Added React import statements in files generated with
figma create
. Thanks @chsmc-stripe!
Added
- React: Added an option to override the imports by passing an
imports
key in the object argument tofigma.connect
. This just takes an array of strings, and is intended as an escape hatch for cases where we can’t determine the imports properly yet. - React: Added support for “partial” props spreading in the example, like
example: ({ variant, ...props }) => <Button variant={variant} {...props} />
. - SwiftUI: Added new
dry-run
command to CLI.
Changed
- React: Moved
path
andimportPath
under thereact
key in the config file. - SwiftUI: CLI now use
--token
instead of--access-token
for the authentication token flag. - SwiftUI: Updated config file format.
- Documentation: Updated README files to fix incorrect information and improving readability.
- Renamed some internal functions for consistency.
Code Connect 0.1.0
Code Connect is a tool for connecting your design system components in code with your design system in Figma. When using Code Connect, Figma's Dev Mode will display true-to-production code snippets from your design system instead of autogenerated code examples. In addition to connecting component definitions, Code Connect also supports mapping properties from code to Figma enabling dynamic and correct examples. This can be useful for when you have an existing design system and are looking to drive consistent and correct adoption of that design system across design and engineering.
Code Connect is easy to set up, easy to maintain, type-safe, and extensible. Out of the box Code Connect comes with support for React, Storybook and SwiftUI.