diff options
Diffstat (limited to 'frontend/src/components/game/CardImage.jsx')
-rw-r--r-- | frontend/src/components/game/CardImage.jsx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/frontend/src/components/game/CardImage.jsx b/frontend/src/components/game/CardImage.jsx new file mode 100644 index 00000000..110d9883 --- /dev/null +++ b/frontend/src/components/game/CardImage.jsx @@ -0,0 +1,15 @@ +import React from 'react'; +import type { ApiCard } from '../../api/model'; +import './Hand.css' + +type CardImageProps = { + card: ApiCard, + otherClasses: string +} + +export const CardImage = ({card, otherClasses}: CardImageProps) => { + return <img src={`/images/cards/${card.image}`} + title={card.name} + alt={'Card ' + card.name} + className={`card-img ${otherClasses}`}/> +}; |