diff options
Diffstat (limited to 'sw-ui/src/components/game/CardImage.tsx')
-rw-r--r-- | sw-ui/src/components/game/CardImage.tsx | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/sw-ui/src/components/game/CardImage.tsx b/sw-ui/src/components/game/CardImage.tsx deleted file mode 100644 index a37595ad..00000000 --- a/sw-ui/src/components/game/CardImage.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import React from 'react'; -import { ApiCard } from '../../api/model'; -import './CardImage.css' - -type CardImageProps = { - card: ApiCard, - otherClasses: string, - highlightColor?: string -} - -export const CardImage = ({card, otherClasses, highlightColor}: CardImageProps) => { - const style = highlightStyle(highlightColor); - return <img src={`/images/cards/${card.image}`} - title={card.name} - alt={'Card ' + card.name} - className={`card-img ${otherClasses}`} - style={style}/> -}; - -function highlightStyle(highlightColor?: string) { - if (highlightColor) { - return { boxShadow: `0 0 1rem 0.1rem ${highlightColor}` }; - } else { - return {}; - } -} |