Forráskód Böngészése

update admin customizations readme

Shahed Nasser 1 éve
szülő
commit
c32427aa8d
1 módosított fájl, 5 hozzáadás és 5 törlés
  1. 5 5
      src/admin/README.md

+ 5 - 5
src/admin/README.md

@@ -1,7 +1,5 @@
 # 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.
 
 ## 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:
 
 ```tsx title="src/admin/widgets/product-widget.tsx"
-import type { WidgetConfig } from "@medusajs/admin"
+import { defineWidgetConfig } from "@medusajs/admin-shared"
 
+// The widget
 const ProductWidget = () => {
   return (
     <div>
@@ -21,9 +20,10 @@ const ProductWidget = () => {
   )
 }
 
-export const config: WidgetConfig = {
+// The widget's configurations
+export const config = defineWidgetConfig({
   zone: "product.details.after",
-}
+})
 
 export default ProductWidget
 ```