Skip to content

Commit

Permalink
Add enableContextMenu description to docs. (#2790)
Browse files Browse the repository at this point in the history
## Description

This PR adds `enableContextMenu` property description to our documentation.

## Test plan

Run docs.
  • Loading branch information
m-bert authored Mar 5, 2024
1 parent ea1696a commit 2510927
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
4 changes: 4 additions & 0 deletions docs/docs/components/drawer-layout.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ Allows users to choose which mouse button should handler respond to. The enum `M

Arguments can be combined using `|` operator, e.g. `mouseButton(MouseButton.LEFT | MouseButton.RIGHT)`. Default value is set to `MouseButton.LEFT`.

### `enableContextMenu(value: boolean)` (Web only)

Specifies whether context menu should be enabled after clicking on underlying view with right mouse button. Default value is set to `false`.

## Methods

### `openDrawer(options)`
Expand Down
4 changes: 4 additions & 0 deletions docs/docs/components/swipeable.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ Allows users to choose which mouse button should handler respond to. The enum `M

Arguments can be combined using `|` operator, e.g. `mouseButton(MouseButton.LEFT | MouseButton.RIGHT)`. Default value is set to `MouseButton.LEFT`.

### `enableContextMenu(value: boolean)` (Web only)

Specifies whether context menu should be enabled after clicking on underlying view with right mouse button. Default value is set to `false`.

## Methods

Using reference to `Swipeable` it's possible to trigger some actions on it
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/gesture-handlers/common-gh.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ Specifying `width` or `height` is useful if we only want the gesture to activate

**IMPORTANT:** Note that this parameter is primarily designed to reduce the area where gesture can activate. Hence it is only supported for all the values (except `width` and `height`) to be non positive (0 or lower). Although on Android it is supported for the values to also be positive and therefore allow to expand beyond view bounds but not further than the parent view bounds. To achieve this effect on both platforms you can use React Native's View [hitSlop](https://reactnative.dev/docs/view.html#props) property.

### `userSelect` (**web only**)
### `userSelect` (Web only)

This parameter allows to specify which `userSelect` property should be applied to underlying view. Possible values are `"none" | "auto" | "text"`. Default value is set to `"none"`.

### `activeCursor` (**web only**)
### `activeCursor` (Web only)

This parameter allows to specify which cursor should be used when gesture activates. Supports all CSS cursor values (e.g. `"grab"`, `"zoom-in"`). Default value is set to `"auto"`.

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/gestures/_shared/base-gesture-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ Adds a relation that makes other gestures wait with activation until this gestur

**IMPORTANT:** Note that this method only marks the relation between gestures, without [composing them](/docs/fundamentals/gesture-composition).[`GestureDetector`](/docs/gestures/gesture-detector) will not recognize the `otherGestures` and it needs to be added to another detector in order to be recognized.

### `activeCursor(value)` (**web only**)
### `activeCursor(value)` (Web only)

This parameter allows to specify which cursor should be used when gesture activates. Supports all CSS cursor values (e.g. `"grab"`, `"zoom-in"`). Default value is set to `"auto"`.
6 changes: 5 additions & 1 deletion docs/docs/gestures/gesture-detector.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,14 @@ GestureDetector will decide whether to use Reanimated to process provided gestur
Starting with Reanimated 2.3.0 Gesture Handler will provide a [StateManager](/docs/gestures/state-manager) in the [touch events](/docs/gestures/touch-events) that allows for managing the state of the gesture.
:::

### `userSelect` (**web only**)
### `userSelect` (Web only)

This parameter allows to specify which `userSelect` property should be applied to underlying view. Possible values are `"none" | "auto" | "text"`. Default value is set to `"none"`.

### `enableContextMenu(value: boolean)` (Web only)

Specifies whether context menu should be enabled after clicking on underlying view with right mouse button. Default value is set to `false`.

## Remarks

- Gesture Detector will use first native view in its subtree to recognize gestures, however if this view is used only to group its children it may get automatically [collapsed](https://reactnative.dev/docs/view#collapsable-android). Consider this example:
Expand Down

0 comments on commit 2510927

Please sign in to comment.