From 720cb79b3103083177ae580b816f733b582cf4b7 Mon Sep 17 00:00:00 2001 From: TheThomaas Date: Mon, 23 Dec 2024 12:50:57 +0100 Subject: [PATCH] Use ContextMenu in GameCard component --- .../src/components/GameCard/index.tsx | 32 +++++++++++++++---- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/src/renderer/src/components/GameCard/index.tsx b/src/renderer/src/components/GameCard/index.tsx index b3627e1..9c3f166 100644 --- a/src/renderer/src/components/GameCard/index.tsx +++ b/src/renderer/src/components/GameCard/index.tsx @@ -1,4 +1,5 @@ import { useEffect, useState } from 'react'; +import ContextMenu, { Item } from '../ContextMenu'; import './index.css'; import { Game } from "@renderer/types"; @@ -20,14 +21,31 @@ const GameCard = ({ title, path, is_running, img_cover, id, }: Game) => { }, []); + const items: Item[] = [ + { + label: 'Details', + onClick: () => + console.log('Details'), + show: true + }, + { + label: 'Details', + onClick: () => + console.log('Details'), + show: true + } + ] + return ( -
- {title}/ - startGame(id)}> - {title} - - {status} -
+ + + ); };