source: components/Card.jsx@ faff334

main
Last change on this file since faff334 was 87614a5, checked in by anastasovv <simon@…>, 2 years ago

Blackjack prototype

  • Property mode set to 100644
File size: 351 bytes
Line 
1import React from 'react'
2
3const Card = ( { card, pos, rotateZ } ) => {
4 const src = `/cards/${card}.png`;
5
6 return (
7 <div className="card" style={{backgroundImage: `url("${src}")`, left: `${pos?.left}vw`, top: `${pos?.top}vh`, transform: `translate(-50%, -50%) rotateZ(${rotateZ}deg)`}}>
8
9 </div>
10 )
11}
12
13export default Card
Note: See TracBrowser for help on using the repository browser.