mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-06 20:13:35 +09:00
With new remix setup we may finally not need hoisted linker which makes pnpm very buggy. Here added all missing dependencies to package.json and removed node linker from .npmrc.
JSX Utils
Utilities to work with JSX, including converting it to Webstudio format.
Usage
Install the package
pnpm i @webstudio-is/jsx-utils
Transform a JSX string to Webstudio Embed Template:
import { jsxToWSEmbedTemplate } from "@webstudio-is/jsx-utils";
await jsxToWSEmbedTemplate("<Box>hello</Box>");
Other utils:
traverseTemplateandtraverseTemplateAsyncto traverse a WsEmbedTemplate and work with nodestailwindToWebstudioconverts a templateclassNameprop to Webstudio local stylesheroiconsToSvgEmbedconverts<HeroIcon name="iconName" type="solid">toHtmlEmbedwith inline SVG