@shift3/swipe-left-util

React component wrapping around mapped items needing swipe to delete functionality. For prototyping only. Currently in development.

Usage no npm install needed!

<script type="module">
  import shift3SwipeLeftUtil from 'https://cdn.skypack.dev/@shift3/swipe-left-util';
</script>

README

swipe-left-util

NPM JavaScript Style Guide

Install

npm install --save @shift3/swipe-left-util

Usage

import React, { Component } from "react";

import { SwipeLeftUtil } from "swipe-left-util";

class Example extends Component {
  render(props) {
    return <SwipeLeftUtil hasDelete>{props.children}</SwipeLeftUtil>;
  }
}

Options

Add a property of hasSave, hasArchive, or hasDelete to enable buttons

License

MIT © @mhigley