Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some fixes and new props #115

Merged
merged 13 commits into from
Jan 23, 2020
Merged
24 changes: 24 additions & 0 deletions docs/PROPSMETHODS.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,30 @@ If you have any inputs inside your cont and you want to manage how the view shou
| ------------------------------------- | -------- |
| enum('height', 'position', 'padding') | No |

### `keyboardAvoidingOffset`

See [`react-native` documentation](https://facebook.github.io/react-native/docs/keyboardavoidingview#keyboardverticaloffset) for more informations.

| Type | Required | Default |
| -------- | -------- | -------- |
| number | No | `0` |

### `panGestureEnabled`

Using this prop will enable/disable pan gesture

| Type | Required | Default |
| -------- | -------- | -------- |
| bool | No | `true` |

### `closeOnOverlayTap`

Using this prop will enable/disable overlay tap gesture

| Type | Required | Default |
| -------- | -------- | -------- |
| bool | No | `true` |

### `withReactModal`

Define if `Modalize` has to be wrap with the Modal component from react-native.
Expand Down
2 changes: 1 addition & 1 deletion examples/expo/src/components/modals/FixedContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class FixedContent extends React.PureComponent {

render() {
return (
<Modalize ref={this.modal} adjustToContentHeight>
<Modalize ref={this.modal} adjustToContentHeight avoidKeyboardLikeIOS>
{this.renderContent()}
</Modalize>
);
Expand Down
1 change: 1 addition & 0 deletions examples/expo/src/components/modals/SimpleContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export class SimpleContent extends React.PureComponent {
showsVerticalScrollIndicator: false,
stickyHeaderIndices: [0],
}}
avoidKeyboardLikeIOS
>
{this.renderContent()}
</Modalize>
Expand Down
2 changes: 1 addition & 1 deletion examples/react-native-navigation/src/screens/AlwaysOpen.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { StyleSheet, Text, View } from 'react-native';
import { Modalize } from 'react-native-modalize';
import faker from 'faker';

import { Button } from '../button/Button';
import { Button } from '../components/button/Button';

export class AlwaysOpen extends React.PureComponent {
modal = React.createRef();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export class CustomStyle extends React.PureComponent {
timing: { duration: 400 },
spring: { speed: 20, bounciness: 10 },
}}
adjustToContentHeight
>
{this.renderContent()}
</Modalize>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"watch:modalize": "yarn tsc --watch",
"watch:expo": "concurrently \"yarn watch:modalize\" \"yarn cpx 'src/**/*' 'examples/expo/node_modules/react-native-modalize' --watch\"",
"watch:react-native-navigation": "concurrently \"yarn watch:modalize\" \"yarn cpx 'src/**/*' 'examples/react-native-navigation/node_modules/react-native-modalize' --watch\"",
"watch:react-navigation": "concurrently \"yarn watch:modalize\" \"yarn cpx 'src/**/*' 'examples/react-navigation/node_modules/react-native-modalize/lib' --watch\""
"watch:react-navigation": "concurrently \"yarn watch:modalize\" \"yarn cpx 'src/**/*' 'examples/react-navigation/node_modules/react-native-modalize' --watch\""
},
"keywords": [
"react-native",
Expand Down
Loading