react-paper-heart

1.0.1 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i react-paper-heart

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

77 kB

Total Files

6

Last publish

Collaborators

  • andy-byers