Skip to content

Instantly share code, notes, and snippets.

@Flow11

Flow11/.tsx Secret

Last active Jun 27, 2020
Embed
What would you like to do?
Zelda BOTW Part 1: ItemsGrid component
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