Skip to content

react-z/react-swipe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-swipe

npm version

A simple react swipe component

Install

yarn add react-z-swipe

Use

import Swipe from 'react-z-swipe'
import ReactDOM from 'react-dom'
import React, { Component } from 'react'

class TestComponent extends Component {
  render () {
    return (
      <div>
        <Swipe elementId="react-swipe-1" navigation={true}>
          <li>
            <img src='react.png' />
          </li>
          <li>
            <img src='styled-components.png' />
          </li>
          <li>
            <img src='webpack.png' />
          </li>
        </Swipe>
        <Swipe elementId="react-swipe-2" navigation={false}>
          <li>
            <img src='react.png' />
          </li>
          <li>
            <img src='styled-components.png' />
          </li>
          <li>
            <img src='webpack.png' />
          </li>
        </Swipe>
      </div>
    )
  }
}

ReactDOM.render(
  <TestComponent />,
  document.getElementById('root')
)

Development

yarn
yarn run dev

Test

yarn run test

Build

yarn
yarn run build

Publish

npm login
npm version patch
git add -A
git push origin master
npm publish

License

MIT

About

a react component for swiping

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •