Skip to content

Commit

Permalink
docs: rename admin-shared -> admin-sdk (#9008)
Browse files Browse the repository at this point in the history
  • Loading branch information
shahednasser authored Sep 6, 2024
1 parent e5b90b2 commit abe7b66
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions www/apps/book/app/advanced-development/admin/tips/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const fetchHighlights = [
]

```tsx title="src/admin/widgets/product-widget.tsx" highlights={fetchHighlights}
import { defineWidgetConfig } from "@medusajs/admin-shared"
import { defineWidgetConfig } from "@medusajs/admin-sdk"
import { Container } from "@medusajs/ui"
import { useEffect, useState } from "react"

Expand Down Expand Up @@ -71,7 +71,7 @@ export const highlights = [
]

```tsx title="src/admin/widgets/product-widget.tsx" highlights={highlights}
import { defineWidgetConfig } from "@medusajs/admin-shared"
import { defineWidgetConfig } from "@medusajs/admin-sdk"
import { Container } from "@medusajs/ui"
import { Link } from "react-router-dom"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const highlights = [
]

```tsx title="src/admin/routes/custom/page.tsx" highlights={[["21"], ["22"], ["23"], ["24"], ["25"], ["26"]]}
import { defineRouteConfig } from "@medusajs/admin-shared"
import { defineRouteConfig } from "@medusajs/admin-sdk"
import { ChatBubbleLeftRight } from "@medusajs/icons"
import { Container } from "@medusajs/ui"

Expand All @@ -80,7 +80,7 @@ export const config = defineRouteConfig({
export default CustomPage
```

The configuration object is created using the `defineRouteConfig` function imported from `@medusajs/admin-shared`. It accepts the following properties:
The configuration object is created using the `defineRouteConfig` function imported from `@medusajs/admin-sdk`. It accepts the following properties:

- `label`: the sidebar item’s label.
- `icon`: an optional React component used as an icon in the sidebar.
Expand All @@ -96,7 +96,7 @@ To create a page under the settings section of the admin dashboard, create the U
For example:

```tsx title="src/admin/routes/settings/custom/page.tsx"
import { defineRouteConfig } from "@medusajs/admin-shared"
import { defineRouteConfig } from "@medusajs/admin-sdk"
import { Container, Heading } from "@medusajs/ui"

const CustomSettingPage = () => {
Expand Down
6 changes: 3 additions & 3 deletions www/apps/book/app/advanced-development/admin/widgets/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const widgetHighlights = [
]

```tsx title="src/admin/widgets/product-widget.tsx" highlights={widgetHighlights}
import { defineWidgetConfig } from "@medusajs/admin-shared"
import { defineWidgetConfig } from "@medusajs/admin-sdk"
import { Container, Heading } from "@medusajs/ui"

// The widget
Expand All @@ -50,7 +50,7 @@ export default ProductWidget

The widget only shows the heading `Product Widget`.

Use the `defineWidgetConfig` function imported from `@medusajs/admin-shared` to create and export the widget's configurations. It accepts as a parameter an object with the following property:
Use the `defineWidgetConfig` function imported from `@medusajs/admin-sdk` to create and export the widget's configurations. It accepts as a parameter an object with the following property:

- `zone`: A string or an array of strings, each being the name of the zone to inject the widget into.

Expand Down Expand Up @@ -89,7 +89,7 @@ export const detailHighlights = [
]

```tsx title="src/admin/widgets/product-widget.tsx" highlights={detailHighlights}
import { defineWidgetConfig } from "@medusajs/admin-shared"
import { defineWidgetConfig } from "@medusajs/admin-sdk"
import { Container, Heading } from "@medusajs/ui"
import {
DetailWidgetProps,
Expand Down
2 changes: 1 addition & 1 deletion www/apps/book/app/basics/admin-customizations/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,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-shared"
import { defineWidgetConfig } from "@medusajs/admin-sdk"

const ProductWidget = () => {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ export const digitalProductPageHighlights = [
]

```tsx title="src/admin/routes/digital-products/page.tsx" highlights={digitalProductPageHighlights} collapsibleLines="1-7" expandMoreLabel="Show Imports"
import { defineRouteConfig } from "@medusajs/admin-shared"
import { defineRouteConfig } from "@medusajs/admin-sdk"
import { PhotoSolid } from "@medusajs/icons"
import { Container, Heading, Table } from "@medusajs/ui"
import { useState } from "react"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1139,7 +1139,7 @@ export const list1Highlights = [
]

```tsx title="src/admin/routes/subscriptions/page.tsx" highlights={list1Highlights} collapsibleLines="1-7" expandMoreLabel="Show Imports"
import { defineRouteConfig } from "@medusajs/admin-shared"
import { defineRouteConfig } from "@medusajs/admin-sdk"
import { ClockSolid } from "@medusajs/icons"
import { Container, Heading, Table, Badge } from "@medusajs/ui"
import { useState } from "react"
Expand Down

0 comments on commit abe7b66

Please sign in to comment.