react-hearthstone
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; // not using an ES6 transpilervar DeckBuilder = DeckBuilder;var CardGallery = CardGallery;var CardList = CardList;
The UMD build is also available on npmcdn:
You can find the library on window.ReactHearthstone
.
See examples and test for details.
Author
Matthias Klein
License
MIT