react-hearthstone

0.4.2 • Public • Published

react-hearthstone

Build Status Coverage Status npm version

React components for Blizzard's Hearthstone. WIP.

Based on hearthstone-deckbuilder. For use with card data from HearthstoneJSON.

Components

DeckBuilder

This will be a complete deck builder application, similar to hearthstone-deckbuilder and based on the other components. Not usable yet.

CardList

A list of cards, for example to represent a deck.

Example: Show a random deck for a random class

CardGallery

A gallery of cards using the game's card images.

Example: Show a gallery of 30 random cards

Installation

Using npm:

$ npm install --save react-hearthstone

Then with a module bundler like webpack that supports either CommonJS or ES2015 modules, use as you would anything else:

// using an ES6 transpiler, like babel
import { DeckBuilder, CardGallery, CardList } from 'react-hearthstone';
 
// not using an ES6 transpiler
var DeckBuilder = require('react-hearthstone').DeckBuilder;
var CardGallery = require('react-hearthstone').CardGallery;
var CardList = require('react-hearthstone').CardList;

The UMD build is also available on npmcdn:

<script src="https://npmcdn.com/react-hearthstone/umd/ReactHearthstone.min.js"></script>
<script src="https://npmcdn.com/react-hearthstone/umd/style.css"></script>

You can find the library on window.ReactHearthstone.

See examples and test for details.

Author

Matthias Klein

License

MIT

Package Sidebar

Install

npm i react-hearthstone

Weekly Downloads

5

Version

0.4.2

License

MIT

Last publish

Collaborators

  • matkl