🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

react-swipeable-button

Package Overview
Dependencies
Maintainers
0
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-swipeable-button - npm Package Compare versions

Comparing version

to
1.1.2

2

dist/cjs/components/SwipeableButton.d.ts

@@ -43,3 +43,3 @@ import React, { Component } from "react";

startDrag: (e: React.MouseEvent<HTMLDivElement> | React.TouchEvent<HTMLDivElement>) => void;
onSuccess: () => void;
onSwiped: () => void;
getText: () => string;

@@ -46,0 +46,0 @@ reset: () => void;

@@ -61,5 +61,5 @@ "use strict";

this.sliderLeft = this.containerWidth;
this.onSwiped();
if (this.props.onSuccess) {
this.props.onSuccess();
this.onSuccess();
}

@@ -82,3 +82,3 @@ }

};
this.onSuccess = () => {
this.onSwiped = () => {
if (this.containerRef.current) {

@@ -124,3 +124,3 @@ this.containerRef.current.style.width = `${this.containerRef.current.clientWidth}px`;

render() {
const { width = 400, height = 60, circle = false, disabled = false, noAnimate = false, autoWidth = true, name = "react-swipeable-button", color, sliderColor, background_color = "#eee", borderRadius = 30, sliderTextColor = "#fff", sliderIconColor = "#fff", } = this.props;
const { width = 300, height = 50, circle = false, disabled = false, noAnimate = false, autoWidth = false, name = "react-swipeable-button", color, sliderColor, background_color = "#eee", borderRadius = 30, sliderTextColor = "#fff", sliderIconColor = "#fff", } = this.props;
const finalSliderColor = sliderColor || color || "#16362d";

@@ -127,0 +127,0 @@ // Log a warning if the deprecated color prop is used

@@ -43,3 +43,3 @@ import React, { Component } from "react";

startDrag: (e: React.MouseEvent<HTMLDivElement> | React.TouchEvent<HTMLDivElement>) => void;
onSuccess: () => void;
onSwiped: () => void;
getText: () => string;

@@ -46,0 +46,0 @@ reset: () => void;

@@ -36,5 +36,5 @@ import React, { Component } from "react";

this.sliderLeft = this.containerWidth;
this.onSwiped();
if (this.props.onSuccess) {
this.props.onSuccess();
this.onSuccess();
}

@@ -57,3 +57,3 @@ }

};
this.onSuccess = () => {
this.onSwiped = () => {
if (this.containerRef.current) {

@@ -99,3 +99,3 @@ this.containerRef.current.style.width = `${this.containerRef.current.clientWidth}px`;

render() {
const { width = 400, height = 60, circle = false, disabled = false, noAnimate = false, autoWidth = true, name = "react-swipeable-button", color, sliderColor, background_color = "#eee", borderRadius = 30, sliderTextColor = "#fff", sliderIconColor = "#fff", } = this.props;
const { width = 300, height = 50, circle = false, disabled = false, noAnimate = false, autoWidth = false, name = "react-swipeable-button", color, sliderColor, background_color = "#eee", borderRadius = 30, sliderTextColor = "#fff", sliderIconColor = "#fff", } = this.props;
const finalSliderColor = sliderColor || color || "#16362d";

@@ -102,0 +102,0 @@ // Log a warning if the deprecated color prop is used

{
"name": "react-swipeable-button",
"version": "1.1.0",
"version": "1.1.2",
"description": "A component to create swipeable button in react",

@@ -36,3 +36,3 @@ "main": "dist/cjs/index.js",

"name": "Abdur Rahman",
"email": "abdur.rahman120@outlook.com",
"email": "personal.abdurrahman@gmail.com",
"url": "https://github.com/abdurrahman720"

@@ -44,2 +44,3 @@ },

},
"bugs": {

@@ -46,0 +47,0 @@ "url": "https://github.com/abdurrahman720/react-swipeable-button/issues"

@@ -86,5 +86,5 @@ # react-swipeable-button

| noAnimate | Boolean | false | Disable css transition |
| width | Number | 400 | Width of element (ignored if autoWidth is true) |
| height | Number | 60 | Height of element |
| autoWidth | Boolean | true | takes 100% width of parent div |
| width | Number | 300 | Width of element (ignored if autoWidth is true) |
| height | Number | 50 | Height of element |
| autoWidth | Boolean | false | takes 100% width of parent div |
| circle | Boolean | true | All parts of component will be with border-radius and rounded handler |

@@ -91,0 +91,0 @@ | disabled | Boolean | false | Disable interaction with component |

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet