-
-
Notifications
You must be signed in to change notification settings - Fork 966
Expand file tree
/
Copy pathGameGrid.tsx
More file actions
25 lines (23 loc) · 654 Bytes
/
GameGrid.tsx
File metadata and controls
25 lines (23 loc) · 654 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import React from 'react';
import { GAME_ARRAY } from '../data';
import Icon from './Icon';
type GameGrid = {
changeItem: (index: number) => any;
};
export default function GameGrid({ changeItem }: GameGrid) {
return (
<>
<div className="grid grid-cols-3 gap-4">
{GAME_ARRAY.map((ele, i) => (
<div
className="md:h-16 sm:w-44 w-20 gird justify-center items-center h-12 bg-[#00f2f2] border-2 border-black rounded-lg cursor-pointer"
key={i}
onClick={() => changeItem(i)}
>
<Icon choice={GAME_ARRAY[i]} />
</div>
))}
</div>
</>
);
}