diff --git a/doc/api.md b/doc/api.md
index 6ab0776..37ca93f 100644
--- a/doc/api.md
+++ b/doc/api.md
@@ -122,7 +122,7 @@ To style `` component you can pass `customStyles` object prop wit
|`triggerOuterWrapper`|`Style`|Style of outer `View` component|
|`triggerWrapper`|`Style`|Style of inner `View` component (can be overriden by `style` prop)|
|`triggerText`|`Style`|Style of `Text` component (used when `text` shorthand option is defined)|
-|`TriggerTouchableComponent`|`Component`|Touchable component of trigger. Default value is `TouchableHighlight` for iOS and `TouchableNativeFeedvack` for Android|
+|`TriggerTouchableComponent`|`Component`|Touchable component of trigger. Default value is `TouchableHighlight` for iOS and `TouchableNativeFeedback` for Android|
|`triggerTouchable`|`Object`|Properties passed to the touchable component (e.g. `activeOpacity`, `underlayColor` for `TouchableHighlight`)|
**Note:** `Style` type is any valid RN style parameter.
@@ -152,7 +152,7 @@ To style `` and it's `` components you can pass `cu
|`optionsContainer`|`Style`|Style passed to the menu renderer (e.g. `Animated.View`)|
|`optionWrapper`|`Style`|Style of `View` component wrapping single option|
|`optionText`|`Style`|Style of `Text` component (when `text` shorthand option is defined)|
-|`OptionTouchableComponent`|`Component`|Touchable component of option. Default value is `TouchableHighlight` for iOS and `TouchableNativeFeedvack` for Android|
+|`OptionTouchableComponent`|`Component`|Touchable component of option. Default value is `TouchableHighlight` for iOS and `TouchableNativeFeedback` for Android|
|`optionTouchable`|`Object`|Properties passed to the touchable component (e.g. `activeOpacity`, `underlayColor` for `TouchableHighlight`)|
**Note:** `optionWrapper`, `optionTouchable` and `optionText` styles of particular menu option can be overriden by `customStyles` prop of `` component.
@@ -190,7 +190,7 @@ To style `` component you can pass `customStyles` object prop with
|---|---|---|
|`optionWrapper`|`Style`|Style of wrapping `View` component.|
|`optionText`|`Style`|Style of `Text` component (when `text` shorthand option is defined)|
-|`OptionTouchableComponent`|`Component`|Touchable component of option. Default value is `TouchableHighlight` for iOS and `TouchableNativeFeedvack` for Android|
+|`OptionTouchableComponent`|`Component`|Touchable component of option. Default value is `TouchableHighlight` for iOS and `TouchableNativeFeedback` for Android|
|`optionTouchable`|`Object`|Properties passed to the touchable component (e.g. `activeOpacity`, `underlayColor` for `TouchableHighlight`)|
**Note:** `Style` type is any valid RN style parameter.
diff --git a/src/index.d.ts b/src/index.d.ts
index 7e1ef2e..d14b00f 100644
--- a/src/index.d.ts
+++ b/src/index.d.ts
@@ -24,7 +24,7 @@ declare module "react-native-popup-menu" {
}
interface MenuProviderStatic extends React.ComponentClass {
- // FIXME: these methods does not get included in ref, unlike WebView in react-native.d.ts
+ // FIXME: these methods do not get included in ref, unlike WebView in react-native.d.ts
open(name: string): Promise;
toggleMenu(name: string): Promise;
@@ -41,8 +41,24 @@ declare module "react-native-popup-menu" {
interface MenuProps {
name?: string;
opened?: boolean;
+ /**
+ * Possible menu renderer options:
+ * - `renderer.ContextMenu`
+ * - `renderer.NotAnimatedContextMenu`
+ * - `renderer.SlideInMenu`
+ * - `renderer.Popover`
+ */
renderer?: Function;
- rendererProps?: any;
+ /**
+ * Optional customization if you passed `renderer.Popover` to the `renderer` prop
+ */
+ rendererProps?: {
+ placement?: "top" | "right" | "bottom" | "left" | "auto";
+ preferredPlacement?: "top" | "right" | "bottom" | "left";
+ anchorStyle?: StyleProp;
+ openAnimationDuration?: number;
+ closeAnimationDuration?: number;
+ };
style?: StyleProp;
onSelect?(optionValue: any): any;
@@ -88,7 +104,7 @@ declare module "react-native-popup-menu" {
triggerOnLongPress?: boolean;
onPress?(): void;
- onAlternativeAction? (): void;
+ onAlternativeAction?(): void;
children?: React.ReactNode;
style?: StyleProp;
}
@@ -199,7 +215,7 @@ declare module "react-native-popup-menu" {
toggleMenu: (name: string) => Promise;
isMenuOpen: () => boolean;
}
-
+
export interface MenuContext {
// This part shouldn't be exported to the user so it's commented out
// menuRegistry: MenuRegistry;