mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-21 12:49:20 +00:00
feat(context-menu): add target prop to selectively trigger context menu
This commit is contained in:
parent
d8f8ac2b73
commit
f603106b18
4 changed files with 82 additions and 28 deletions
7
types/ContextMenu/ContextMenu.svelte.d.ts
vendored
7
types/ContextMenu/ContextMenu.svelte.d.ts
vendored
|
@ -3,6 +3,13 @@ import { SvelteComponentTyped } from "svelte";
|
|||
|
||||
export interface ContextMenuProps
|
||||
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["ul"]> {
|
||||
/**
|
||||
* Specify an element or list of elements to trigger the context menu.
|
||||
* If no element is specified, the context menu applies to the entire window
|
||||
* @default null
|
||||
*/
|
||||
target?: null | HTMLElement | HTMLElement[];
|
||||
|
||||
/**
|
||||
* Set to `true` to open the menu
|
||||
* Either `x` and `y` must be greater than zero
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue