Skip to content

Commit

Permalink
render RecipeCards in a responsive grid layout
Browse files Browse the repository at this point in the history
- Display RecipeCards using a responsive grid with Tailwind CSS
- Passed recipe data to RecipeCards component
- Utilized grid layout for different screen sizes with padding and spacing
  • Loading branch information
KoketsoMoilwe20 committed Oct 21, 2024
1 parent 21eac74 commit cf9ecb7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions app/components/RecipeGrid.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,14 @@ const RecipeGrid = () => {

fetchRecipes();
}, []);

return (
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-6 p-6">
{recipes.map(recipe => (
<RecipeCards key={recipe.id} recipe={recipe} />
))}
</div>
);
};

export default RecipeGrid;

0 comments on commit cf9ecb7

Please sign in to comment.