1.0.1 • Published 3 years ago

react-paper-heart v1.0.1

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

react-paper-heart

A paper-themed heart-shaped toggle for React, inspired by origami and ❤️

NPM JavaScript Style Guide

Install

npm i --save react-paper-heart

Usage

import React from "react";
import { PaperHeart } from "react-paper-heart";

function Example() {
  return <PaperHeart onChange={e => alert(e.target.checked)} />;
};

export default Example;

Check out https://andy-byers.github.io/react-paper-heart/ for some examples.

Todo

  • Add a transparent background behind the heart as currently clicking between the halves fails to fire the onClick event

License

MIT © andy-byers