Skip to main content
Version: 5.4

RecipeDetailsIgnoredProduct

Ignored

To create your own recipe detail product ignore template you create a class that implements RecipeDetailsIgnoredProductProtocol

import SwiftUI
import MealziOSSDK
import mealzcore

@available(iOS 14, *)
public struct MyCustomRecipeDetailsIgnoredProductView: RecipeDetailsIgnoredProductProtocol {

public init() {}
public func content(params: RecipeDetailsIgnoredProductParameters) -> some View {
// Your custom design here
}
}

with

public struct RecipeDetailsIgnoredProductParameters {
/// Name of the underlying ingredient
public let ingredientName: String
/// Quantity of the underlying ingredient
public let ingredientQuantity: String?
/// Unit of the underlying ingredient (ex: g, kg, etc)
public let ingredientUnit: String?
/// Guest count set by the user
public let guestsCount: Int
/// Guest count of the associated recipe
public let defaultRecipeGuest: Int
/// Closure to open the Item Selector
public let onChooseProduct: () -> Void