main
Last change
on this file since 22367db was 87614a5, checked in by anastasovv <simon@…>, 2 years ago |
Blackjack prototype
|
-
Property mode
set to
100644
|
File size:
351 bytes
|
Rev | Line | |
---|
[87614a5] | 1 | import React from 'react'
|
---|
| 2 |
|
---|
| 3 | const 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 |
|
---|
| 13 | export default Card |
---|
Note:
See
TracBrowser
for help on using the repository browser.