Skip to main content

Interface: AddToFavoriteProps

Defined in: components/AddToFavorite.tsx:29

Properties

className?

optional className?: string

Defined in: components/AddToFavorite.tsx:43

Extra CSS class applied to the root button


clusterId?

optional clusterId?: number

Defined in: components/AddToFavorite.tsx:40

Cluster ID to add/remove from favorites (for clusters)


graphqlClient?

optional graphqlClient?: GraphQLClient

Defined in: components/AddToFavorite.tsx:31

The initialized GraphQL Client instance. Resolved from PropellerProvider when omitted.


labels?

optional labels?: Record<string, string>

Defined in: components/AddToFavorite.tsx:46

UI string overrides


onFavoriteChanged?

optional onFavoriteChanged?: (change?) => void

Defined in: components/AddToFavorite.tsx:57

Called after the favorite toggle succeeds, with which way it went.

The argument is optional so existing zero-argument callbacks keep working. Without it an add and a removal are indistinguishable, so a host cannot report "added to wishlist" without inventing the direction — and a wishlist metric that also counts removals is worse than none.

Parameters

change?

FavoriteChange

Returns

void


productId?

optional productId?: number

Defined in: components/AddToFavorite.tsx:37

Product ID to add/remove from favorites (for products)


user?

optional user?: Contact | Customer | null

Defined in: components/AddToFavorite.tsx:34

The authenticated user. Resolved from PropellerProvider when omitted.