modelyo-shared-ui
v1.0.37
Published
A shared UI component library for Modelyo
Downloads
41
Maintainers
Readme
modelyo-shared-ui
This is the shared UI component library for the Modelyo projects.
What’s inside
✅ Reusable UI components – like MetricsGrid, PricingTable, StepperSection, and more.
✅ Shared types – such as CMSBlock, Badge, and other block-related types.
✅ Default content – preconfigured content for each block type.
Usage
In your project, install the package:
npm install modelyo-shared-uiThen import and use the components:
import { blockRendererMap, defaultContentForKey } from "modelyo-shared-ui";
const Component = templateMap["metrics_grid"];
<Component block={myBlock} handleClick={() => {}} />;Notes
All components expect a block prop with the correct type.
If you’re using dynamic rendering, make sure to type-check the block inside your components.
For adding new components, update the shared UI repo and publish a new version.Publish updates
To publish updates (after merging to main):
npm version patch # or minor/major
npm publish --access public