Skip to content

Commit bf2a9ae

Browse files
author
Luke Brandon Farrell
authored
Merge branch 'master' into all-contributors/add-Danite
2 parents 3467a5d + c3b80eb commit bf2a9ae

9 files changed

+4697
-4200
lines changed

.all-contributorsrc

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,43 @@
55
"imageSize": 100,
66
"commit": false,
77
"contributors": [
8+
{
9+
"login": "rodriigovieira",
10+
"name": "Rodrigo Vieira",
11+
"avatar_url": "https://avatars.githubusercontent.com/u/7014073?v=4",
12+
"profile": "https://github.com/rodriigovieira",
13+
"contributions": [
14+
"code",
15+
"bug",
16+
"doc",
17+
"maintenance"
18+
]
19+
},
20+
{
21+
"login": "lukebrandonfarrell",
22+
"name": "Luke Brandon Farrell",
23+
"avatar_url": "https://avatars.githubusercontent.com/u/18139277?v=4",
24+
"profile": "https://discord.gg/QqTN6HqNTG",
25+
"contributions": [
26+
"code",
27+
"bug",
28+
"doc"
29+
]
30+
},
831
{
932
"login": "Danite",
1033
"name": "Daniil Merkulov",
1134
"avatar_url": "https://avatars.githubusercontent.com/u/9094825?v=4",
1235
"profile": "https://github.com/Danite",
36+
"contributions": [
37+
"code",
38+
]
39+
},
40+
{
41+
"login": "CursedWizard",
42+
"name": "CyberFuntik",
43+
"avatar_url": "https://avatars.githubusercontent.com/u/67508707?v=4",
44+
"profile": "https://github.com/CursedWizard",
1345
"contributions": [
1446
"code",
1547
"doc"

README.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,18 @@ There's a complete and functional example at the `example` folder, with more tho
9595
The props below are used to configure the drawer and are to be used in RNN `passProps:`. Any aditional
9696
props will be passed to your custom drawer component.
9797

98-
| Prop | Type | Optional | Default | Description |
99-
| ------------------- | ------------- | --------- | ------- | --------------------------------------------------------------------------------------- |
100-
| animationOpenTime | float | Yes | 300 | Time in milliseconds to execute the drawer opening animation. |
101-
| animationCloseTime | float | Yes | 300 | Time in milliseconds to execute the drawer closing animation. |
102-
| direction | string | Yes | left | Direction to open the collage, one of: ["left", "right", "top", "bottom"]. |
103-
| dismissWhenTouchOutside | bool | Yes | true | Should the drawer be dismissed when a click is registered outside? |
104-
| fadeOpacity | number | Yes | 0.6 | Opacity of the screen outside the drawer. |
105-
| drawerScreenWidth | number | Yes | 0.8 | 0 - 1, width of drawer in relation to the screen. |
106-
| drawerScreenHeight | number | Yes | 1 | 0 - 1, height of drawer in relation to the screen. |
98+
| Prop | Type | Optional | Default | Description |
99+
| ---------------------------- | ------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------ |
100+
| animationOpenTime | float | Yes | 300 | Time in milliseconds to execute the drawer opening animation. |
101+
| animationCloseTime | float | Yes | 300 | Time in milliseconds to execute the drawer closing animation. |
102+
| direction | string | Yes | left | Direction to open the collage, one of: ["left", "right", "top", "bottom"]. |
103+
| dismissWhenTouchOutside | bool | Yes | true | Should the drawer be dismissed when a click is registered outside? |
104+
| fadeOpacity | number | Yes | 0.6 | Opacity of the screen outside the drawer. |
105+
| drawerScreenWidth | number/string | Yes | 80% | Width of drawer on portrait orientation. Pass a string containing '%' (e.g. "80%") for setting the width in relation to the screen or a number for absolute width (e.g. 300) |
106+
| drawerScreenWidthOnLandscape | number/string | Yes | 30% | Width of drawer on landscape orientation. Pass a string containing '%' (e.g. "80%") for setting the width in relation to the screen or a number for absolute width (e.g. 300) |
107+
| drawerScreenHeight | number/string | Yes | 100% | Height of drawer. Pass a string containing '%' (e.g. "30%") for setting the height in relation to the screen or a number for absolute height (e.g. 300)
108+
| disableDragging | boolean | Yes | false | Whether you want to disable dragging of the drawer. Useful if you have ScrollView inside the drawer (addresses #62).|
109+
| disableSwiping | boolean | Yes | false | Whether you want to disable swiping gesture. Use it only in pair with disableDragging. |
107110

108111
## SideMenuView
109112

@@ -156,6 +159,10 @@ import { SideMenuView } from "react-native-navigation-drawer-extension";
156159
| sideMarginRight | number | Yes | | The size of the gutter for the right side. |
157160
158161
## Contributors ✨
162+
163+
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
164+
[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-)
165+
<!-- ALL-CONTRIBUTORS-BADGE:END -->
159166
160167
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
161168
@@ -165,6 +172,9 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
165172
<table>
166173
<tr>
167174
<td align="center"><a href="https://github.com/Danite"><img src="https://avatars.githubusercontent.com/u/9094825?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Daniil Merkulov</b></sub></a><br /><a href="https://github.com/aspect-apps/react-native-navigation-drawer-extension/commits?author=Danite" title="Code">💻</a> <a href="https://github.com/aspect-apps/react-native-navigation-drawer-extension/commits?author=Danite" title="Documentation">📖</a></td>
175+
<td align="center"><a href="https://github.com/rodriigovieira"><img src="https://avatars.githubusercontent.com/u/7014073?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Rodrigo Vieira</b></sub></a><br /><a href="https://github.com/aspect-apps/react-native-navigation-drawer-extension/commits?author=rodriigovieira" title="Code">💻</a> <a href="https://github.com/aspect-apps/react-native-navigation-drawer-extension/issues?q=author%3Arodriigovieira" title="Bug reports">🐛</a> <a href="https://github.com/aspect-apps/react-native-navigation-drawer-extension/commits?author=rodriigovieira" title="Documentation">📖</a> <a href="#maintenance-rodriigovieira" title="Maintenance">🚧</a></td>
176+
<td align="center"><a href="https://discord.gg/QqTN6HqNTG"><img src="https://avatars.githubusercontent.com/u/18139277?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Luke Brandon Farrell</b></sub></a><br /><a href="https://github.com/aspect-apps/react-native-navigation-drawer-extension/commits?author=lukebrandonfarrell" title="Code">💻</a> <a href="https://github.com/aspect-apps/react-native-navigation-drawer-extension/issues?q=author%3Alukebrandonfarrell" title="Bug reports">🐛</a> <a href="https://github.com/aspect-apps/react-native-navigation-drawer-extension/commits?author=lukebrandonfarrell" title="Documentation">📖</a></td>
177+
<td align="center"><a href="https://github.com/CursedWizard"><img src="https://avatars.githubusercontent.com/u/67508707?v=4?s=100" width="100px;" alt=""/><br /><sub><b>CyberFuntik</b></sub></a><br /><a href="https://github.com/aspect-apps/react-native-navigation-drawer-extension/commits?author=CursedWizard" title="Code">💻</a> <a href="https://github.com/aspect-apps/react-native-navigation-drawer-extension/commits?author=CursedWizard" title="Documentation">📖</a></td>
168178
</tr>
169179
</table>
170180
@@ -173,4 +183,4 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
173183
174184
<!-- ALL-CONTRIBUTORS-LIST:END -->
175185
176-
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
186+
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!

lib/RNNDrawer.d.ts

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ declare interface RNNDrawerOptions {
1717
* If not provided, drawer might have
1818
* a weird effect when closing
1919
*/
20-
direction: DirectionType;
20+
direction?: DirectionType;
2121
/**
2222
* Time in milliseconds to execute the drawer opening animation
2323
*/
@@ -35,13 +35,22 @@ declare interface RNNDrawerOptions {
3535
*/
3636
fadeOpacity?: number;
3737
/**
38-
* Width of drawer in relation to the screen (0 to 1)
38+
* Width of drawer on portrait orientation. Pass a string containing '%' (e.g. "80%")
39+
* for setting the width in relation to the screen or a number for absolute width (e.g. 300)
3940
*/
40-
drawerScreenWidth?: number;
41+
drawerScreenWidth?: number | string;
4142
/**
42-
* Height of drawer in relation to the screen (0 to 1)
43+
* Width of drawer on landscape orientation. Pass a string containing '%' (e.g. "80%")
44+
* for setting the width in relation to the screen or a number for absolute width (e.g. 300)
4345
*/
44-
drawerScreenHeight?: number;
46+
drawerScreenWidthOnLandscape?: number | string;
47+
/**
48+
* Height of drawer. Pass a string containing '%' (e.g. "30%")
49+
* for setting the height in relation to the screen or a number for absolute height (e.g. 300)
50+
*/
51+
drawerScreenHeight?: number | string;
52+
disableDragging?: boolean;
53+
disableSwiping?: boolean;
4554
}
4655
export declare enum DirectionType {
4756
left = "left",

0 commit comments

Comments
 (0)