-
-
Save flagrede/f752e3e2de8cbb6a7edf1609dc42f9b7 to your computer and use it in GitHub Desktop.
Zelda BOTW Part 1: ItemsGrid component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import Item from "./Item"; | |
import { ItemType } from "../data/items.type"; | |
type Props = { | |
items: ItemType[]; | |
}; | |
const ItemsGrid: React.FC<Props> = ({ items }) => ( | |
<div className="grid grid-cols-3 md:grid-cols-5 gap-6"> | |
{items.map((item, index) => ( | |
<Item | |
key={`${item.name}-${index}`} | |
name={item.name} | |
icon={item.icon} | |
value={item.value} | |
/> | |
))} | |
</div> | |
); | |
export default ItemsGrid; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment