select cards
This commit is contained in:
@@ -18,6 +18,7 @@ type CardProps = {
|
||||
settings: Settings;
|
||||
flipAction: () => void;
|
||||
redrawAction: () => void;
|
||||
selectAction: () => void;
|
||||
};
|
||||
|
||||
export default function Card({
|
||||
@@ -27,8 +28,10 @@ export default function Card({
|
||||
settings,
|
||||
flipAction,
|
||||
redrawAction,
|
||||
selectAction,
|
||||
}: CardProps) {
|
||||
const [tooltip, setTooltip] = useState<React.ReactNode>(null);
|
||||
|
||||
const { aria, flipped } = card;
|
||||
|
||||
const handleClick = () => {
|
||||
@@ -80,7 +83,7 @@ export default function Card({
|
||||
{dm && !flipped && (
|
||||
<StackTheDeck
|
||||
onRedraw={redrawAction}
|
||||
onSelect={() => console.log('Pick')}
|
||||
onSelect={() => selectAction()}
|
||||
onHover={setTooltip}
|
||||
/>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user