You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

@arlenwang/react-native-swipeout

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arlenwang/react-native-swipeout - npm Package Compare versions

Comparing version

to
2.4.1

3

package.json
{
"name": "@arlenwang/react-native-swipeout",
"version": "2.4.0",
"version": "2.4.1",
"description": "iOS-style swipeout buttons behind component",

@@ -8,3 +8,2 @@ "main": "src/index.js",

"scripts": {
"build": "rm -rf dist && cross-env BABEL_ENV=commonjs babel src --out-dir dist",
"test": "echo \"Error: no test specified\" && exit 1"

@@ -11,0 +10,0 @@ },

@@ -368,6 +368,7 @@ import tweenState from 'react-tween-state';

right: {
//left: Math.abs(contentWidth + Math.max(limit, posX)),
left: Math.abs(contentWidth + Math.max(limit, posX)),
right: 0,
},
};
//console.log('contentWidth',styleRightPos.right.left,contentWidth,limit,posX)
var styleContentPos = {

@@ -382,4 +383,3 @@ content: {

var styleRight = [styles.swipeoutBtns];
styleRight.push(styleRightPos.right);
var styleRight = {...styles.swipeoutBtns,...styleRightPos.right};

@@ -418,3 +418,7 @@ var styleLeft = [styles.swipeoutBtns];

if (buttons && isVisible) {
console.log('style',style)
let addWidth = 0;
buttons.forEach((item,index)=>{
if(item.buttonWidth)addWidth +=item.buttonWidth
})
if(addWidth>0)style.left = style.left- addWidth;
return (<View style={style}>

@@ -421,0 +425,0 @@ {buttons.map(this._renderButton)}