1.9.9 • Published 3 years ago

react-nyan-flappy v1.9.9

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

react-nyan

Insert at hidden flappy-bird clone with nyan-cat into your React application!

Defaults to binding to Ctrl + Option + Command + Shift + n on Mac (ctrl+alt+win+shift+n on windows). You can override this with the hotkey attribute. Valid hotkey combos are pulled from react-hotkeys

Install

npm install --save react-nyan

// or

yarn add react-nyan

Developer Usage

(pretty much the same as the demo page)

import React from "react";
import { render } from "react-dom";
import Nyan from "react-nyan";

function Demo() {
  return (
    <div>

      <h1>Demo (press ctrl+alt+win+shift+n on windows, and ctrl+option+command+shift+n on mac)</h1>
      <Nyan />

      <hr />

      <h1>Demo with custom hotkey (press ctrl+n)</h1>
      <Nyan hotkey="ctrl+n"/>

    </div>
  );
}

render(<Demo />, document.getElementById("app"));

Credit

This code was modified and upgraded to React 16 from npmjs.com/react-nyan

License

MIT