소스 검색

update admin customizations readme

Shahed Nasser 1 년 전
부모
커밋
c32427aa8d
1개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  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
 ```