1.0.0 • Published 5 years ago
simple-card-game-ui v1.0.0
What is this?
Tool to crate simple card game ui
Installation
npm i simple-card-game-ui --save
and
import 'simple-card-game-ui/dist/style.css';
then...
import {makeCardUi} from 'simple-card-game-ui'
Create card
First we create a simple element with id or class.
<div class="sample-card">
Then ...
makeCardUi({
    class: 'sample-card',
    value: 14,
    suit: 'S'
})Options
makeCardUi({
    value: Number,
    suit: 'Suit',
    id: 'id-name',
    class: 'class-name'
    height: Number,
    width: Number,
    borderColor: 'color',
    borderSize: Number,
    radius: Number,
})- value - Value of card 1-14, you can pass also letter like k,q,j / K,J,Q for Ace you can pass 14/1/A/a
 - suit - Suits of card you can pass H,S,C,D / h,s,c,d.
 - id - Insert the id of the element. notice that you not insert class with id
 - class - Insert the class of the element. notice that you not insert id with class
 - height - The height of the card. insert only number
 - width - The width of the card. insert only number
 - borderColor - Border color.
 - borderSize - Border size.
 - radius - Border raduis.
 
1.0.0
5 years ago