Socket
Book a DemoInstallSign in
Socket

react-swipte-to-delete-ios

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

react-swipte-to-delete-ios

A React Component that mimic the behavior of line deletion in iOS

unpublished
latest
Source
npmnpm
Version
2.0.0
Version published
Maintainers
1
Created
Source

react-swipe-to-delete-ios

A simple React component to reproduce the way iOS deletes an item in a list. Demo

GIF Demo

Config very much insipred by this post

Installation

npm i --save react-swipe-to-delete-ios
yarn add react-swipe-to-delete-ios

Usage

import React from 'react'
import SwipeToDelete from 'react-swipe-to-delete-ios'

...

<SwipeToDelete
  onDelete={handleDelete} // required
  // optional
  height={50} // default
  transitionDuration={250} // default
  deleteWidth={75} // default
  deleteColor="rgba(252, 58, 48, 1.00)" // default
  deleteText="Delete" // default
  deleteComponent={<DeleteComponent/>} // not default
  disabled={false} // default
  rtl={false} // default
>
  {children}
</SwipeToDelete>

Props

PropTypeDefault
onDeletefunctionrequired
heightnumber50
transitionDurationnumber (ms)250
deleteWidthnumber (px)75
deleteColorstring"rgba(252, 58, 48, 1.00)"
deleteTextstring"Delete" (deleteText or deleteComponent)
deleteComponentnodenull (deleteText or deleteComponent)
disabledboolfalse
rtlboolfalse

Changelog

  • v2: rewrite the whole lobrary: remove styled-components, rewrite in Hooks, height is now optional.

Keywords

react

FAQs

Package last updated on 17 May 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts