react-typescript-playing-card
v1.0.9
Published
A modern React TypeScript playing card component.
Downloads
9
Maintainers
Readme
react-typescript-playing-card
A modern React TypeScript playing card component.
Installation
npm install react-typescript-playing-card
Usage
TypeScript:
import React from "react";
import { PlayingCard, PlayingCardSuit, PlayingCardNumber } from "react-typescript-playing-card";
import "react-typescript-playing-card/dist/index.css";
const App = () => {
return (
<PlayingCard
suit={PlayingCardSuit.SPADES}
number={PlayingCardNumber.ACE}
width={250}
height={350}
/>
);
};
JavaScript 🤢 (learn TypeScript!):
import React from "react";
import { PlayingCard } from "react-typescript-playing-card";
import "react-typescript-playing-card/dist/index.css";
const App = () => {
return (
<PlayingCard
suit={"spades"}
number={'A'}
width={250}
height={350}
/>
);
};