1.3.0 • Published 2 years ago

chayns-swipeable v1.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

chayns-swipeable

A wrapper component that reveals contextual actions on swipe.

Installation

npm install chayns-swipeable framer-motion

Usage

import { Swipeable } from "chayns-swipeable";
import "chayns-swipeable/dist/index.css";
import { Icon } from "chayns-components";

const MyComponent = () => (
  <Swipeable
    leftActions={[
      {
        color: "#3B82F6",
        text: "Delete",
        icon: <Icon icon={`fas ${isUnread ? "fa-check" : "fa-envelope"}`} />,
        action: () => alert("Deleted!"),
      },
    ]}
    rightActions={
      [
        // Same as `leftActions`
      ]
    }
  >
    Anything goes here...
  </Swipeable>
);
1.3.0

2 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago