To use preview for components from palette, net to do:
1) install @react-buddy/ide-toolbox with version 1.1.0-dev.0
2) import palette component with palette tree from "palette.tsx" and add it in jsx element form to property palette to Preview component.
3) run dev-server with env variable REACT_APP_IDE_DEVMODE=true
Routing for palette component:
All routes for palette component start with /REACT_BUDDY_PALETTE. Next comes "/" + category name (located in name property in "Category" component). Next - "/" + component name (located in name property in "Component" component). Finaly - "/" + variant name (located in name property in "Variant" component). If variant component hasn't name property, need to use value DEFAULT_VARIANT. Note: result route path must be processed by encode url function.
To use preview for components from palette, net to do: 1) install @react-buddy/ide-toolbox with version 1.1.0-dev.0 2) import palette component with palette tree from "palette.tsx" and add it in jsx element form to property palette to Preview component.
3) run dev-server with env variable REACT_APP_IDE_DEVMODE=true
Routing for palette component: All routes for palette component start with /REACT_BUDDY_PALETTE. Next comes "/" + category name (located in name property in "Category" component). Next - "/" + component name (located in name property in "Component" component). Finaly - "/" + variant name (located in name property in "Variant" component). If variant component hasn't name property, need to use value DEFAULT_VARIANT. Note: result route path must be processed by encode url function.