diff --git a/README.md b/README.md index 6b4da8d..aca5081 100644 --- a/README.md +++ b/README.md @@ -268,7 +268,10 @@ const styles = StyleSheet.create({ | 🔤 `isContextMenuEnabled`

⚛️ `boolean`

✳️ **Default**: `true` | Enables or disables the context menu. Useful if you want to temporarily disable the context menu. | | 🔤 `lazyPreview`

⚛️ `boolean`

✳️ **Default**: `true` | If set to `true` (which it is by default), the custom context menu preview (i.e the component returned from the `ContextMenuView.renderPreview` prop) will only be mounted/rendered when the context menu interaction begins (i.e when the context menu is about to be shown).

Set this to `false` if you want the preview content to be always mounted. | | 🔤 `useActionSheetFallback`

⚛️ `boolean`

✳️ **Default**: `true` | Context menus are only supported on iOS 13+ (i.e context menus are not supported on iOS 12, and below).

On iOS 12 and below, a long press on a `ContextMenuView` will show a [`ActionSheetIOS`](https://reactnative.dev/docs/actionsheetios#docsNav) menu based on the current `menuConfig` prop.

If you want to disable this behavior, set this prop to false.

📝 **Note**: Default value is `false` on iOS 13+, and `true` on iOS 12 and below. | -| 🔤 `renderPreview`

⚛️ [`abc`](PLACE_HOLDER_LINK) | This prop is a "render" prop, i.e it accepts a function that returns a react component.

The returned component will displayed in the context menu preview. | +| 🔤 `renderPreview`

⚛️ [`() => React.ReactElement`](PLACE_HOLDER_LINK) | This prop is a "render" prop, i.e it accepts a function that returns a react component.

The returned component will displayed in the context menu preview. | +| 🔤 `isAuxiliaryPreviewEnabled`

⚛️ `boolean`

✳️ **Default**: `false` | TBA | +| 🔤 `auxiliaryPreviewConfig`

⚛️ `MenuAuxiliaryPreviewConfig` | TBA | +| 🔤 `renderAuxillaryPreview`

⚛️ `() => React.ReactElement` | TBA |
@@ -282,8 +285,10 @@ const styles = StyleSheet.create({ | 🔤 `onMenuDidHide`

⚛️ [`OnMenuDidHideEvent`](./src/types/MenuEvents.ts) | Event that gets called **after** the context menu is hidden, i.e this event is invoked after the menu exit animation is finished. | | 🔤 `onMenuWillCancel`

⚛️ [`OnMenuWillCancelEvent`](./src/types/MenuEvents.ts) | Event that gets called when the menu is **cancelled and about to be hidden**, i.e this event is immediately invoked when the context menu interaction is cancelled. | | 🔤 `onMenuDidCancel`

⚛️ [`OnMenuDidCancelEvent`](./src/types/MenuEvents.ts) | Event that gets called when the menu is **cancelled and hidden**, i.e. this event is invoked when the context menu is cancelled, and the menu exit transition is finished. | -| 🔤 `onPressMenuItem`

⚛️ [`OnPressMenuItemEvent`](./src/types/MenuEvents.ts) | Event that gets called when a menu action is pressed.

You can identify which action was pressed via `nativeEvent.actionKey ` property in the `nativeEvent` object.

Check out [Example 1](#contextmenuview-example-01), and [Example 9](#contextmenuview-example-09) for examples regarding the `onPressMenuItem` event prop. | +| 🔤 `onPressMenuItem`

⚛️ [`OnPressMenuItemEvent`](./src/types/MenuEvents.ts) | Event that gets called when a menu action is pressed.

You can identify which action was pressed via `nativeEvent.actionKey ` property in the `nativeEvent` object.

Check out [Example 1](#contextmenuview-example-01), and [Example 9](#contextmenuview-example-09) for examples regarding the `onPressMenuItem` event prop.

📝 **Note**: If `shouldWaitForMenuToHide`
`BeforeFiringOnPressMenuItem` prop is set to `true` (which it is by default), then this event will fire after `onMenuDidHide` is triggered. | | 🔤 `onPressMenuPreview`

⚛️ [`OnPressMenuPreviewEvent`](./src/types/MenuEvents.ts) | Event that gets called when the menu's preview is pressed. | +| 🔤 `onMenuAuxiliaryPreviewWillShow`

⚛️ [`OnMenuAuxiliaryPreviewWillShowEvent`](./src/types/MenuEvents.ts) | TBA | +| 🔤 `onMenuAuxiliaryPreviewDidShow`

⚛️ [`OnMenuAuxiliaryPreviewDidShowEvent`](./src/types/MenuEvents.ts) | TBA |
@@ -544,6 +549,60 @@ A union string type that maps to `UIMenu.Options` option set (see [apple docs](h
+#### 📄 `MenuAuxiliaryPreviewConfig.ts` + +* 📌 **Declaration**: [`MenuAuxiliaryPreviewConfig.ts`](src/types/MenuAuxiliaryPreviewConfig.ts) + +
+ +##### Object Type: `MenuAuxiliaryPreviewConfig` + +| Name and Type | Description | +| ------------- | ----------- | +| TBA | TBA | + +
+ +##### String Union Type: `MenuAuxiliaryPreviewAnchorPosition` + +| Name and Type | Description | +| ------------- | ----------- | +| TBA | TBA | + +
+ +##### String Union Type: `UIViewAnimateOptions` + +| Name and Type | Description | +| ------------- | ----------- | +| TBA | TBA | + +
+ +##### Object Type: `UIViewAnimateConfig` + +| Name and Type | Description | +| ------------- | ----------- | +| TBA | TBA | + +
+ +##### Object Type: `MenuAuxiliaryPreviewTransitionConfig` + +| Name and Type | Description | +| ------------- | ----------- | +| TBA | TBA | + +
+ +##### Union Type: `MenuAuxiliaryPreviewTransitionEntranceDelay` + +| Name and Type | Description | +| ------------- | ----------- | +| TBA | TBA | + +
+ #### 📄 `MenuIconConfig.ts` * 📌 **Declaration**: [`MenuIconConfig.ts`](src/types/MenuIconConfig.ts)