SalePrice
katanakit-js / SalePrice
Interface: SalePrice
Section titled “Interface: SalePrice”Defined in: types/core/currency.ts:34
Result of useSalePrice: the regular price, the discounted price and the rounded percentage taken off.
Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
percentOff |
number |
Percentage taken off, rounded to two decimals (e.g. 40, 12.5). |
types/core/currency.ts:40 |
price |
number |
Regular price, echoed back for display. | types/core/currency.ts:36 |
salePrice |
number |
Price after the discount, unrounded — let the currency formatter own the digits. | types/core/currency.ts:38 |