Skip to content

tjacobs3/react-pokercards

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

React Component to display Poker Cards

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 93.0%
  • TypeScript 7.0%