Class: RecipeCardFeaturedPG

RecipeCardFeaturedPG()

This is the component for the Featured Recipe Card element in the Featured Recipe Page.

Constructor

new RecipeCardFeaturedPG()

Attach the shadowroot which contains the Featured Recipe Card materials.
Source:

Members

data

The data needed to populate the materials are passed in as "data".
Source:

Methods

changeHeart(data, cardObj)

Toggles on and off the heart based on favorite
Parameters:
Name Type Description
data Object a JSON data object contains information to keep track of which recipe is being added to favorites.
cardObj HTMLElement an HTML element that contains the heart image.
Source:
Returns:
Void