diff --git a/apps/www/content/docs/components/block-context-menu.mdx b/apps/www/content/docs/components/block-context-menu.mdx index 9fc747a270..34acb7b461 100644 --- a/apps/www/content/docs/components/block-context-menu.mdx +++ b/apps/www/content/docs/components/block-context-menu.mdx @@ -37,6 +37,7 @@ Install the following dependencies: ```bash npm install @radix-ui/react-context-menu ``` +- [ContextMenu](/docs/components/context-menu) - [BlockSelection](/docs/block-selection) - [BlockMenu](/docs/block-menu) diff --git a/apps/www/content/docs/components/context-menu.mdx b/apps/www/content/docs/components/context-menu.mdx new file mode 100644 index 0000000000..ebcb89cde2 --- /dev/null +++ b/apps/www/content/docs/components/context-menu.mdx @@ -0,0 +1,69 @@ +--- +title: Context Menu +description: Displays a menu to the user — such as a set of actions or functions — triggered by a button. +component: true +links: + doc: https://www.radix-ui.com/docs/primitives/components/context-menu + api: https://www.radix-ui.com/docs/primitives/components/context-menu#api-reference +--- + +## Installation + + + + + CLI + Manual + + + +```bash +npx shadcn@latest add context-menu -r plate-ui +``` + + + + + + + +Install the following dependencies: + +```bash +npm install @radix-ui/react-context-menu +``` + +Copy and paste the following code into your project. + + + +Update the import paths to match your project setup. + + + + + + + +## Usage + +```tsx +import { + ContextMenu, + ContextMenuContent, + ContextMenuItem, + ContextMenuTrigger, +} from "@/components/ui/context-menu" +``` + +```tsx + + Right click + + Profile + Billing + Team + Subscription + + +``` diff --git a/apps/www/content/docs/components/slash-input-element.mdx b/apps/www/content/docs/components/slash-input-element.mdx index 6ace49c5eb..643782ceef 100644 --- a/apps/www/content/docs/components/slash-input-element.mdx +++ b/apps/www/content/docs/components/slash-input-element.mdx @@ -33,7 +33,9 @@ npx @udecode/plate-ui@latest add slash-input-element -r plate-ui Install the following dependencies: -- [SlashCommand](/docs/slash-command) +- [Combobox](/docs/combobox) +- [Slash Command](/docs/slash-command) +- [InlineCombobox](/docs/components/inline-combobox) @@ -44,6 +46,7 @@ Copy and paste the following code into your project. + @@ -62,6 +65,8 @@ Update the import paths to match your project setup. + + ## Plate Plus diff --git a/apps/www/src/config/customizer-components.ts b/apps/www/src/config/customizer-components.ts index 7a5e5a9479..d2ba187c47 100644 --- a/apps/www/src/config/customizer-components.ts +++ b/apps/www/src/config/customizer-components.ts @@ -83,6 +83,10 @@ export const customizerComponents = { href: '/docs/components/comments-popover', title: 'Comments Popover', }, + contextMenu: { + href: '/docs/components/context-menu', + title: 'Context Menu', + }, cursorOverlay: { href: '/docs/components/cursor-overlay', title: 'Cursor Overlay', diff --git a/apps/www/src/config/docs.ts b/apps/www/src/config/docs.ts index 1cebeb26c2..d7ad8f897e 100644 --- a/apps/www/src/config/docs.ts +++ b/apps/www/src/config/docs.ts @@ -65,6 +65,7 @@ export const docsConfig: DocsConfig = { customizerComponents.codeLineElement, customizerComponents.codeSyntaxLeaf, customizerComponents.colorDropdownMenu, + customizerComponents.contextMenu, customizerComponents.command, customizerComponents.commentLeaf, customizerComponents.commentToolbarButton,