You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/api.md
+11-4Lines changed: 11 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,12 @@ The only known exception is when you use [Modal](https://facebook.github.io/reac
17
17
|`closeMenu`||Closes currently opened menu|
18
18
|`isMenuOpen`||Returns `true` if any menu is open|
19
19
20
+
### Properties
21
+
| Option | Type | Opt/Required | Default | Note |
22
+
|---|---|---|---|---|
23
+
|`style`|`Style`|Optional||Style of wrapping `View` component. Same as `customStyles.menuContextWrapper` but when both are present result style is a merge where this style has higher precedence.|
24
+
|`customStyles`|`Object`|Optional||Object defining wrapper, touchable and text styles|
25
+
20
26
### Custom styles
21
27
22
28
To style `<MenuContext />` and backdrop component you can pass `customStyles` object prop with following keys:
@@ -27,14 +33,15 @@ To style `<MenuContext />` and backdrop component you can pass `customStyles` ob
27
33
|`backdrop`|`Style`|Backdrop `View` style|
28
34
29
35
**Note:**`Style` type is any valid RN style parameter.
36
+
**Note:** In addition to these styles we add also `{flex:1}`. You can disable it by e.g. `style={{flex:0}}`.
30
37
31
38
See more in custom styling [example](../examples/StylingExample.js).
32
39
33
40
## Menu
34
41
35
42
Root menu component defining menu name and providing menu events.
36
43
37
-
### Options
44
+
### Properties
38
45
| Option | Type | Opt/Required | Default | Note |
39
46
|---|---|---|---|---|
40
47
|`name`|`String`|Optional|`auto-generated`|Unique name of menu|
@@ -66,7 +73,7 @@ Menu can by opened by clicking on `<MenuTrigger />` or by calling context method
66
73
67
74
**Note:** It is necessary that `<MenuTrigger />` is a direct child of `<Menu />`.
68
75
69
-
### Options
76
+
### Properties
70
77
| Option | Type | Opt/Required | Default | Note |
71
78
|---|---|---|---|---|
72
79
|`disabled`|`Boolean`|Optional|`false`|Indicates if trigger can be pressed|
@@ -98,7 +105,7 @@ This component wrapps all menu options.
98
105
99
106
**Note:** It is necessary that `<MenuOptions />` is a direct child of `<Menu />`.
100
107
101
-
### Options
108
+
### Properties
102
109
| Option | Type | Opt/Required | Default | Note |
103
110
|---|---|---|---|---|
104
111
|`optionsContainerStyle`|`Style`|Optional||Custom styles for options container. Note: this option is deprecated, use `customStyles` option instead|
@@ -127,7 +134,7 @@ See more in custom styling [example](../examples/StylingExample.js).
0 commit comments