react-native-modal
Advanced tools
Comparing version 2.3.2 to 2.4.0
{ | ||
"name": "react-native-modal", | ||
"version": "2.3.2", | ||
"version": "2.4.0", | ||
"description": "An enhanced React-Native modal", | ||
@@ -8,3 +8,5 @@ "main": "src/index.js", | ||
"lint": "eslint src", | ||
"precommit": "lint-staged", | ||
"test": "npm run lint", | ||
"prettier": "prettier --write --print-width 100 --single-quote --trailing-comma all src/**/*.js", | ||
"reset": "watchman watch-del-all && rm -rf node_modules/ && npm cache clean && npm prune && yarn cache clean" | ||
@@ -25,14 +27,28 @@ }, | ||
"license": "ISC", | ||
"homepage": "https://github.com/react-native-community/react-native-modal", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/react-native-community/react-native-modal" | ||
}, | ||
"dependencies": { | ||
"react-native-animatable": "^1.1.1" | ||
"prop-types": "15.5.10", | ||
"react-native-animatable": "^1.2.0" | ||
}, | ||
"devDependencies": { | ||
"babel-eslint": "^6.1.2", | ||
"babel-eslint": "^7.2.3", | ||
"eslint": "^3.5.0", | ||
"eslint-plugin-prettier": "^2.0.0", | ||
"eslint-plugin-react-app": "^1.0.2", | ||
"prettier": "^0.18.0", | ||
"husky": "0.13.3", | ||
"lint-staged": "3.4.1", | ||
"prettier": "^1.3.1", | ||
"react": ">=15.0.0", | ||
"react-native": ">=0.24.0" | ||
}, | ||
"lint-staged": { | ||
"*.js": [ | ||
"npm run test", | ||
"npm run prettier", | ||
"git add" | ||
] | ||
} | ||
} |
@@ -0,6 +1,21 @@ | ||
[![npm version](https://badge.fury.io/js/react-native-modal.svg)](https://badge.fury.io/js/react-native-modal) | ||
| ||
<img src="https://github.com/react-native-community/react-native-modal/raw/master/extras/react-native-modal-logo.png" width="130" align="left" /> | ||
# react-native-modal | ||
An enhanced, animated and customizable react-native modal. | ||
Previously known as `react-native-animated-modal`. | ||
| ||
| ||
## Description | ||
This component enhances the original react-native modal by adding animations and many possible customization options while still providing nice defaults: | ||
- You can customize the backdrop opacity, color, animation type and animation timing. | ||
- You can provide your own content and customize its animation type and animation timing. | ||
- You'll know when the animations end thanks to `onModalShow` and `onModalHide` | ||
# Gifs! | ||
P.S.: The modal will resize itself correctly on device rotation. | ||
## Gifs! | ||
<p align="center"> | ||
@@ -12,10 +27,2 @@ <img src="https://raw.githubusercontent.com/mmazzarolo/react-native-tips/master/imgs/modal.gif" height="300" /> | ||
## Description | ||
This component enhances the original react-native modal by adding animations and many possible customization options while still providing nice defaults: | ||
- You can customize the backdrop opacity, color, animation type and animation timing. | ||
- You can provide your own content and customize its animation type and animation timing. | ||
- You'll know when the animations end thanks to `onModalShow` and `onModalHide` | ||
P.S.: The modal will resize itself correctly on device rotation. | ||
## Setup | ||
@@ -22,0 +29,0 @@ This library is available on npm, install it with: `npm install --save react-native-modal`. |
@@ -1,3 +0,4 @@ | ||
import React, { Component, PropTypes } from 'react'; | ||
import React, { Component } from 'react'; | ||
import { Dimensions, Modal } from 'react-native'; | ||
import PropTypes from 'prop-types'; | ||
import { View, initializeRegistryWithDefinitions } from 'react-native-animatable'; | ||
@@ -148,3 +149,3 @@ import * as ANIMATION_DEFINITIONS from './animations'; | ||
onLayout={this._handleLayout} | ||
ref={ref => this.backdropRef = ref} | ||
ref={ref => (this.backdropRef = ref)} | ||
style={[ | ||
@@ -156,3 +157,3 @@ styles.backdrop, | ||
<View | ||
ref={ref => this.contentRef = ref} | ||
ref={ref => (this.contentRef = ref)} | ||
style={[{ margin: deviceWidth * 0.05 }, styles.content, style]} | ||
@@ -159,0 +160,0 @@ {...otherProps} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
12665
199
0
87
0
2
8
+ Addedprop-types@15.5.10
+ Addedasap@2.0.6(transitive)
+ Addedcore-js@1.2.7(transitive)
+ Addedencoding@0.1.13(transitive)
+ Addedfbjs@0.8.18(transitive)
+ Addediconv-lite@0.6.3(transitive)
+ Addedis-stream@1.1.0(transitive)
+ Addedisomorphic-fetch@2.2.1(transitive)
+ Addednode-fetch@1.7.3(transitive)
+ Addedpromise@7.3.1(transitive)
+ Addedprop-types@15.5.10(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedsetimmediate@1.0.5(transitive)
+ Addedua-parser-js@0.7.39(transitive)
+ Addedwhatwg-fetch@3.6.20(transitive)