Interface: AddToFavoriteProps
Defined in: components/AddToFavorite.tsx:29
Properties
className?
optionalclassName?:string
Defined in: components/AddToFavorite.tsx:43
Extra CSS class applied to the root button
clusterId?
optionalclusterId?:number
Defined in: components/AddToFavorite.tsx:40
Cluster ID to add/remove from favorites (for clusters)
graphqlClient?
optionalgraphqlClient?:GraphQLClient
Defined in: components/AddToFavorite.tsx:31
The initialized GraphQL Client instance. Resolved from PropellerProvider when omitted.
labels?
optionallabels?:Record<string,string>
Defined in: components/AddToFavorite.tsx:46
UI string overrides
onFavoriteChanged?
optionalonFavoriteChanged?: (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?
optionalproductId?:number
Defined in: components/AddToFavorite.tsx:37
Product ID to add/remove from favorites (for products)
user?
optionaluser?:Contact|Customer|null
Defined in: components/AddToFavorite.tsx:34
The authenticated user. Resolved from PropellerProvider when omitted.