💫 WIP: Context Menu Auxiliary Preview
Summary: Expose `auxiliaryPreviewConfig` via props.
This commit is contained in:
parent
b1208deb27
commit
4b286a093c
@ -46,6 +46,7 @@ export class ContextMenuView extends
|
||||
useActionSheetFallback,
|
||||
menuConfig,
|
||||
previewConfig,
|
||||
auxiliaryPreviewConfig,
|
||||
shouldUseDiscoverabilityTitleAsFallbackValueForSubtitle,
|
||||
// event props
|
||||
onMenuWillShow,
|
||||
@ -77,6 +78,7 @@ export class ContextMenuView extends
|
||||
// B. Pass down props...
|
||||
menuConfig,
|
||||
previewConfig,
|
||||
auxiliaryPreviewConfig,
|
||||
onMenuWillShow,
|
||||
onMenuWillHide,
|
||||
onMenuWillCancel,
|
||||
@ -224,6 +226,7 @@ export class ContextMenuView extends
|
||||
ref={r => { this.nativeRef = r! }}
|
||||
menuConfig={props.menuConfig}
|
||||
previewConfig={props.previewConfig}
|
||||
auxiliaryPreviewConfig={props.auxiliaryPreviewConfig}
|
||||
|
||||
// Events: `onPress`-Related
|
||||
onMenuWillShow={this._handleOnMenuWillShow}
|
||||
|
||||
@ -9,6 +9,7 @@ export type RenderItem = () => React.ReactElement;
|
||||
export type ContextMenuViewBaseProps = Pick<RNIContextMenuViewProps,
|
||||
| 'menuConfig'
|
||||
| 'previewConfig'
|
||||
| 'auxiliaryPreviewConfig'
|
||||
| 'shouldUseDiscoverabilityTitleAsFallbackValueForSubtitle'
|
||||
| 'isContextMenuEnabled'
|
||||
// Lifecycle Events
|
||||
|
||||
@ -2,6 +2,7 @@ import { requireNativeComponent, Platform, ViewProps, HostComponent, View } from
|
||||
|
||||
import type { MenuConfig } from '../types/MenuConfig';
|
||||
import type { MenuPreviewConfig } from '../types/MenuPreviewConfig';
|
||||
import type { MenuAuxiliaryPreviewConfig } from '../types/MenuAuxiliaryPreviewConfig';
|
||||
import type { OnMenuWillShowEvent, OnMenuWillHideEvent, OnMenuDidShowEvent, OnMenuDidHideEvent, OnMenuWillCancelEvent, OnMenuDidCancelEvent, OnMenuWillCreateEvent, OnPressMenuItemEvent, OnPressMenuPreviewEvent, } from '../types/MenuEvents';
|
||||
|
||||
|
||||
@ -13,6 +14,7 @@ export type RNIContextMenuViewProps = ViewProps & {
|
||||
|
||||
menuConfig?: MenuConfig;
|
||||
previewConfig?: MenuPreviewConfig;
|
||||
auxiliaryPreviewConfig?: MenuAuxiliaryPreviewConfig;
|
||||
|
||||
/**
|
||||
* On iOS 15+, the `MenuActionConfig.discoverabilityTitle` is no longer
|
||||
|
||||
Loading…
Reference in New Issue
Block a user