upgrade to rc5 with breaking changes
This commit is contained in:
@ -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 product’s details page.
|
||||
This inserts a widget with the text “Product Widget” at the end of a product’s details page.
|
||||
|
||||
Reference in New Issue
Block a user