diff --git a/docs/src/pages/components/ContextMenu.svx b/docs/src/pages/components/ContextMenu.svx index d195fd63..a37e7a32 100644 --- a/docs/src/pages/components/ContextMenu.svx +++ b/docs/src/pages/components/ContextMenu.svx @@ -9,9 +9,23 @@ components: ["ContextMenu", "ContextMenuGroup", "ContextMenuRadioGroup", "Contex In the examples, right click anywhere within the iframe. ### Default + +By default, the context menu will trigger when right clicking anywhere in the `window`. +### Custom target + +Specify a custom `HTMLElement` using the `target` prop. + + + +### Multiple targets + +The `target` prop also accepts an array of elements. + + + ### Radio groups \ No newline at end of file diff --git a/docs/src/pages/framed/ContextMenu/ContextMenuTarget.svelte b/docs/src/pages/framed/ContextMenu/ContextMenuTarget.svelte new file mode 100644 index 00000000..87b4d8a6 --- /dev/null +++ b/docs/src/pages/framed/ContextMenu/ContextMenuTarget.svelte @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Right click this element

+
+ + diff --git a/docs/src/pages/framed/ContextMenu/ContextMenuTargets.svelte b/docs/src/pages/framed/ContextMenu/ContextMenuTargets.svelte new file mode 100644 index 00000000..aa51e7de --- /dev/null +++ b/docs/src/pages/framed/ContextMenu/ContextMenuTargets.svelte @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Right click this element

+

... or this one

+
+ +