SaleWarningToast
SaleWarningToast shows the sale's stock warning, such as an add that will be backordered.
Import
import { SaleWarningToast } from '@tallyui/components';Usage
<SaleWarningToast warning={sale.warning} />Mount it once beside AddedToCartToast, as a late child of the screen's root view. When an add or a quantity raise passes the stock of a product that takes backorders with notice, the add still happens and it shows WCPOS v2's warning toast, such as "Shirt will be backordered", for 4 seconds, in its own slot below the add toast. Each new seq shows it again; a warning already there when it mounts does not show. A host that does not mount it shows nothing.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
warning | SaleWarning | null | required | useSale().warning: the latest stock warning ({ kind, name, seq }), or null before any; a new seq is a new warning |
testID | string | 'sale-warning-toast' | Test identifier |