From fd2b0f4b223c4a92de0e10cbabd21955436c150d Mon Sep 17 00:00:00 2001 From: jbion Date: Tue, 26 Feb 2019 18:27:57 +0100 Subject: Extract CardImage --- frontend/src/components/game/CardImage.jsx | 15 +++++++++++++++ frontend/src/components/game/Hand.jsx | 6 ++---- 2 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 frontend/src/components/game/CardImage.jsx (limited to 'frontend/src') 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 {'Card +}; diff --git a/frontend/src/components/game/Hand.jsx b/frontend/src/components/game/Hand.jsx index 2b8ca196..9b29742e 100644 --- a/frontend/src/components/game/Hand.jsx +++ b/frontend/src/components/game/Hand.jsx @@ -2,6 +2,7 @@ import { Button, ButtonGroup, Classes, Intent } from '@blueprintjs/core'; import React from 'react'; import type { ApiHandCard, ApiPlayerMove } from '../../api/model'; import './Hand.css' +import { CardImage } from './CardImage'; type HandProps = { cards: ApiHandCard[], @@ -24,10 +25,7 @@ type HandCardProps = { const HandCard = ({card, wonderUpgradable, prepareMove}: HandCardProps) => { let playableClass = card.playability.playable ? '' : 'unplayable'; return
- {'Card +
}; -- cgit