Setting the file. One moment.
Subchapter 1.92
references/context-provider/vertical-contexts/stores/promotion-item.mdMarkdown2 KBView on GitHub
@wix/stores/context/promotion-itemRead Importing a Context in Code first. Import only the hook, from .
@wix/stores/context/promotion-itemSupplies the promotion for one product list promotion entry.
import { PromotionItemContextProvider } from '@wix/stores/context/promotion-item';__0: PromotionItemContextProviderPropsElementReads the current promotion, or returns null outside a promotion item provider.
import { usePromotionItemContext } from '@wix/stores/context/promotion-item';PromotionItemContextValue \| null| Property | Type | Description |
|---|---|---|
promotionItem | PromotionItem | undefined | |
children | ReactNode |
| Property | Type | Description |
|---|---|---|
id | string | The id of the promotion |
name | string | undefined | The name of the promotion (should not be used for display) |
destinationUrl | Link | undefined | The destination URL of the promotion |
image | PromotionImage | undefined | The image of the promotion |
altText | string | undefined | The alt text of the promotion |
position | number | The position of the promotion |
| Property | Type | Description |
|---|---|---|
id | string | The id of the promotion |
url | string | |
width | number | undefined | |
height | number | undefined |