Browse Source

update admin customizations readme

Shahed Nasser 1 year ago
parent
commit
c32427aa8d
1 changed files with 5 additions and 5 deletions
  1. 5 5
      src/admin/README.md

+ 5 - 5
src/admin/README.md

@@ -1,7 +1,5 @@
 # Admin Customizations
 # Admin Customizations
 
 
-> Admin customizations are coming soon.
-
 You can extend the Medusa Admin to add widgets and new pages. Your customizations interact with API routes to provide merchants with custom functionalities.
 You can extend the Medusa Admin to add widgets and new pages. Your customizations interact with API routes to provide merchants with custom functionalities.
 
 
 ## Example: Create a Widget
 ## Example: Create a Widget
@@ -11,8 +9,9 @@ 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:
 For example, create the file `src/admin/widgets/product-widget.tsx` with the following content:
 
 
 ```tsx title="src/admin/widgets/product-widget.tsx"
 ```tsx title="src/admin/widgets/product-widget.tsx"
-import type { WidgetConfig } from "@medusajs/admin"
+import { defineWidgetConfig } from "@medusajs/admin-shared"
 
 
+// The widget
 const ProductWidget = () => {
 const ProductWidget = () => {
   return (
   return (
     <div>
     <div>
@@ -21,9 +20,10 @@ const ProductWidget = () => {
   )
   )
 }
 }
 
 
-export const config: WidgetConfig = {
+// The widget's configurations
+export const config = defineWidgetConfig({
   zone: "product.details.after",
   zone: "product.details.after",
-}
+})
 
 
 export default ProductWidget
 export default ProductWidget
 ```
 ```