Skip to main content
Version: 4.0

RecipeDetailIngredients

Ingredients

To create your own recipe detail ingredients template you create a class that implements RecipeDetailsIngredientsProtocol

import SwiftUI
import mealzcore
import MealziOSSDK

@available(iOS 14, *)
public struct MyCustomRecipeDetailsFooterView: RecipeDetailsIngredientsProtocol {
public func content(params: RecipeDetailsIngredientsParameters) -> some View {
// your imp here
}
}

with

public struct RecipeDetailsIngredientsParameters {
/// Ingredients included in the Recipe.
public let ingredients: [Ingredient]
/// How many guests the recipe is ideal for, sourced from VM.
public let recipeGuests: Int
/// The current number of guests.
public let currentGuests: Int