From e8c953de25b9807935ebb8c9c0ef84d81aa2bd38 Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Wed, 26 Feb 2025 13:03:55 +0200 Subject: [PATCH] docs: add new cards to recipe section (#11615) --- .../Homepage/RecipesSection/index.tsx | 20 +++- www/apps/resources/generated/sidebar.mjs | 2 +- www/apps/resources/sidebars/recipes.mjs | 2 +- .../src/components/Icons/Erp/index.tsx | 92 +++++++++++++++++++ .../src/components/Icons/Restock/index.tsx | 55 +++++++++++ .../docs-ui/src/components/Icons/index.tsx | 2 + 6 files changed, 169 insertions(+), 4 deletions(-) create mode 100644 www/packages/docs-ui/src/components/Icons/Erp/index.tsx create mode 100644 www/packages/docs-ui/src/components/Icons/Restock/index.tsx diff --git a/www/apps/book/components/Homepage/RecipesSection/index.tsx b/www/apps/book/components/Homepage/RecipesSection/index.tsx index 67be258bfc..bd77badf7e 100644 --- a/www/apps/book/components/Homepage/RecipesSection/index.tsx +++ b/www/apps/book/components/Homepage/RecipesSection/index.tsx @@ -4,19 +4,28 @@ import { Card, CardProps, ChefHatIcon, + ErpIcon, IconHeadline, ImageBinaryIcon, Link, + RestockIcon, ScrollTextIcon, ShopIcon, } from "docs-ui" const HomepageRecipesSection = () => { const cards: CardProps[] = [ + { + type: "large", + title: "ERP", + text: "Integrate an ERP system to manage custom product prices, purchase rules, syncing orders, and more.", + href: "https://docs.medusajs.com/resources/recipes/erp", + icon: ErpIcon, + }, { type: "large", title: "Marketplace", - text: "Build a marketplace with multiple vendors", + text: "Build a marketplace with multiple vendors.", href: "https://docs.medusajs.com/resources/recipes/marketplace/examples/vendors", icon: ShopIcon, }, @@ -30,7 +39,7 @@ const HomepageRecipesSection = () => { { type: "large", title: "Restaurant-Delivery", - text: "Build a restaurant marketplace inspired by UberEats, with real-time delivery handling", + text: "Build a restaurant marketplace inspired by UberEats, with real-time delivery handling.", href: "https://docs.medusajs.com/resources/recipes/marketplace/examples/restaurant-delivery", icon: ChefHatIcon, }, @@ -41,6 +50,13 @@ const HomepageRecipesSection = () => { href: "https://docs.medusajs.com/resources/recipes/digital-products/examples/standard", icon: ImageBinaryIcon, }, + { + type: "large", + title: "Restock Notifications", + text: "Notify customers when a product is back in stock.", + href: "https://docs.medusajs.com/resources/recipes/commerce-automation/restock-notification", + icon: RestockIcon, + }, ] return (
diff --git a/www/apps/resources/generated/sidebar.mjs b/www/apps/resources/generated/sidebar.mjs index 5751386f32..1a249778c2 100644 --- a/www/apps/resources/generated/sidebar.mjs +++ b/www/apps/resources/generated/sidebar.mjs @@ -164,7 +164,7 @@ export const generatedSidebar = [ "isPathHref": true, "type": "link", "path": "/recipes/erp/odoo", - "title": "Odoo Integration", + "title": "Example: Odoo Integration", "children": [] } ] diff --git a/www/apps/resources/sidebars/recipes.mjs b/www/apps/resources/sidebars/recipes.mjs index aa43266647..db648a430b 100644 --- a/www/apps/resources/sidebars/recipes.mjs +++ b/www/apps/resources/sidebars/recipes.mjs @@ -49,7 +49,7 @@ export const recipesSidebar = [ { type: "link", path: "/recipes/erp/odoo", - title: "Odoo Integration", + title: "Example: Odoo Integration", }, ], }, diff --git a/www/packages/docs-ui/src/components/Icons/Erp/index.tsx b/www/packages/docs-ui/src/components/Icons/Erp/index.tsx new file mode 100644 index 0000000000..7a2c9b2958 --- /dev/null +++ b/www/packages/docs-ui/src/components/Icons/Erp/index.tsx @@ -0,0 +1,92 @@ +import React from "react" +import { IconProps } from "@medusajs/icons/dist/types" + +export const ErpIcon = (props: IconProps) => { + return ( + + + + + + + + + + + + + + + ) +} diff --git a/www/packages/docs-ui/src/components/Icons/Restock/index.tsx b/www/packages/docs-ui/src/components/Icons/Restock/index.tsx new file mode 100644 index 0000000000..43b2bf3293 --- /dev/null +++ b/www/packages/docs-ui/src/components/Icons/Restock/index.tsx @@ -0,0 +1,55 @@ +import React from "react" +import { IconProps } from "@medusajs/icons/dist/types" + +export const RestockIcon = (props: IconProps) => { + return ( + + + + + + + + + ) +} diff --git a/www/packages/docs-ui/src/components/Icons/index.tsx b/www/packages/docs-ui/src/components/Icons/index.tsx index d33254ed11..a4e85a5d8d 100644 --- a/www/packages/docs-ui/src/components/Icons/index.tsx +++ b/www/packages/docs-ui/src/components/Icons/index.tsx @@ -3,9 +3,11 @@ export * from "./CalendarRefresh" export * from "./ChefHat" export * from "./CircleDottedLine" export * from "./DecisionProcess" +export * from "./Erp" export * from "./ImageBinary" export * from "./PuzzleColored" export * from "./QuestionMark" +export * from "./Restock" export * from "./ScrollText" export * from "./ShadedBg" export * from "./Shop"