upgrade to rc5 with breaking changes

This commit is contained in:
2024-10-16 15:36:47 +05:30
parent da100fcfb5
commit 1a8d961240
25 changed files with 4616 additions and 3588 deletions

View File

@ -9,7 +9,7 @@ A widget is a React component that can be injected into an existing page in the
For example, create the file `src/admin/widgets/product-widget.tsx` with the following content:
```tsx title="src/admin/widgets/product-widget.tsx"
import { defineWidgetConfig } from "@medusajs/admin-sdk"
import { defineWidgetConfig } from "@medusajs/admin-sdk";
// The widget
const ProductWidget = () => {
@ -17,15 +17,15 @@ const ProductWidget = () => {
<div>
<h2>Product Widget</h2>
</div>
)
}
);
};
// The widget's configurations
export const config = defineWidgetConfig({
zone: "product.details.after",
})
});
export default ProductWidget
export default ProductWidget;
```
This inserts a widget with the text “Product Widget” at the end of a products details page.
This inserts a widget with the text “Product Widget” at the end of a products details page.