react-pokercards
v1.1.0
Published
React Component to display Poker Cards
Downloads
21
Maintainers
Readme
react-pokercards
React Component to display Poker Cards in your React Application
Poker Canvas
I used the Poker Canvas Library from Tairraos/Poker.JS
Installation
$ npm install react-pokercards
$ yarn add react-pokercards
Usage
import PokerCard from 'react-pokercards';
Display the Ace of Spades
<PokerCard short={'As'}/>
//or
<PokerCard point={'A'} suit={'s'}/>
Display the Ten of Diamonds
<PokerCard short={'Td'}/>
//or
<PokerCard point={'T'} suit={'d'}/>
Display just the backside
<PokerCard isBackwards={true} short={'2c'}/>
//or
<PokerCard isBackwards={true}/>
defaultProps
PokerCard.defaultProps = {
style: {},
className: '',
alt: '',
size: 120,
isBackwards: false,
foregroundColor: '#BB5555',
backgroundColor: '#AA2222',
short: undefined,
suit: undefined,
point: undefined,
};
License
MIT