Skip to main content
Version: 5.4

OrderDetailsRecipeCard

OrderDetailsRecipeCard

To create your own recipe card template you create a class that implements OrderDetailsRecipeCardProtocol

import SwiftUI
import mealzcore
import MealziOSSDK

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

with

public struct OrderDetailsRecipeCardParameters {
/// All the data we need for the recipe card
public let data: RecipeCardData
/// Boolean that determines if the recipe is in the basket
@Binding var isInBasket: Bool
/// Function to open the Recipe Details page
public let showRecipeDetails: () -> Void