import React from "react";
export interface RecipeHeaderProps {
title: string;
chef: string;
origin: string;
prepTime: string;
servings: number;
}
export function RecipeHeader({ title, chef, origin, prepTime, servings }: RecipeHeaderProps) {
return (
{title}
👨🍳 Chef: {chef}
🇫🇷 Origin: {origin}
⏱️ Prep: {prepTime}
🍽️ Serves: {servings}
);
}
export interface ChefInfoProps {
name: string;
bio: string;
sourceUrl: string;
imageUrl?: string;
}
export function ChefInfo({ name, bio, sourceUrl, imageUrl }: ChefInfoProps) {
return (
{imageUrl && (

)}
);
}
export interface IngredientListProps {
title: string;
ingredients: Array<{ quantity: string; name: string }>;
}
export function IngredientList({ title, ingredients }: IngredientListProps) {
return (
🥚 {title}
{ingredients.map((ingredient, index) => (
-
•
{ingredient.quantity}
{ingredient.name}
))}
);
}
export interface InstructionStepsProps {
steps: Array<{ number: number; instruction: string }>;
}
export function InstructionSteps({ steps }: InstructionStepsProps) {
return (
📝 Instructions
{steps.map((step) => (
-
{step.number}
{step.instruction}
))}
);
}
export interface TipCardProps {
tip: string;
author: string;
}
export function TipCard({ tip, author }: TipCardProps) {
return (
);
}
export interface Recipe {
title: string;
description: string;
imageUrl?: string;
chef: ChefInfoProps;
header: RecipeHeaderProps;
ingredientLists: IngredientListProps[];
steps: InstructionStepsProps;
tip: TipCardProps;
}
export function RecipeCard({ recipe }: { recipe: Recipe }) {
return (
{recipe.imageUrl && (

)}
{recipe.title}
{recipe.description}
{recipe.ingredientLists.map((list, index) => (
))}
);
}