@bonprix-ds/react-price-stacked 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +34 -0
- package/dist/index.js +1557 -0
- package/dist/index.js.map +1 -0
- package/package.json +49 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { default as default_2 } from 'react';
|
|
2
|
+
|
|
3
|
+
declare interface BaseProps {
|
|
4
|
+
/** Current price of the item. Available and mandatory for all variants except `no-price`. */
|
|
5
|
+
finalPrice: number;
|
|
6
|
+
/** If set, the voucher is displayed with the given percentage. Optional for all variants except `no-price`. Can be used alongside `voucherDiscount` and `startPrice`! */
|
|
7
|
+
discountInPercent?: number;
|
|
8
|
+
/** The price of the item without voucher discount. Optional for all variants except `no-price`. Must be used alongside `startPrice`! */
|
|
9
|
+
voucherDiscount?: number;
|
|
10
|
+
/** The price of the item without discount. Optional for all variants except `no-price`. Must be used alongside `voucherDiscount`! */
|
|
11
|
+
startPrice?: number;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare interface NoPriceProps {
|
|
15
|
+
/** One of the valid variants of the price component. */
|
|
16
|
+
variant: "no-price";
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
declare const PriceStacked: (props: PriceStackedProps) => default_2.JSX.Element;
|
|
20
|
+
export default PriceStacked;
|
|
21
|
+
|
|
22
|
+
export declare type PriceStackedProps = RegularProps | SaleProps | NoPriceProps;
|
|
23
|
+
|
|
24
|
+
declare interface RegularProps extends BaseProps {
|
|
25
|
+
/** One of the valid variants of the price component. */
|
|
26
|
+
variant: "regular";
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare interface SaleProps extends BaseProps {
|
|
30
|
+
/** One of the valid variants of the price component. */
|
|
31
|
+
variant: "sale";
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { }
|