@rileybathurst/paddle 1.9.10 → 1.9.12
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/package.json +1 -1
- package/src/index.tsx +1 -0
- package/src/paddle-location-deck.tsx +1 -1
- package/src/paddle-purchase.tsx +3 -11
- package/src/paddle-texture-backgrounds.tsx +18 -6
- package/src/types/paddle-location-types.ts +1 -2
- package/src/types/paddle-purchase-image-types.ts +11 -0
- package/src/types/paddle-purchase-types.ts +16 -7
package/package.json
CHANGED
package/src/index.tsx
CHANGED
|
@@ -38,6 +38,7 @@ export * from "./types/paddle-location-types";
|
|
|
38
38
|
export * from "./types/paddle-location-deck-types";
|
|
39
39
|
export * from "./types/paddle-gatsby-image-type";
|
|
40
40
|
export * from "./types/paddle-purchase-types";
|
|
41
|
+
export * from "./types/paddle-purchase-image-types";
|
|
41
42
|
export * from "./types/paddle-brand-types";
|
|
42
43
|
export * from "./types/paddle-book-now-types";
|
|
43
44
|
export * from "./types/paddle-testimonial-types";
|
package/src/paddle-purchase.tsx
CHANGED
|
@@ -5,6 +5,7 @@ import type { PaddleGatsbyImageType } from "./types/paddle-gatsby-image-type";
|
|
|
5
5
|
import { PaddleInchesRemainder } from "./paddle-inches-remainder";
|
|
6
6
|
import { PaddleTextureBackgrounds } from "./paddle-texture-backgrounds";
|
|
7
7
|
import { PaddlePurchaseTypes } from "./types/paddle-purchase-types";
|
|
8
|
+
import { PaddlePurchaseAndImageTypes } from "./types/paddle-purchase-image-types";
|
|
8
9
|
|
|
9
10
|
// TODO: I'm not sure if this is needed or I can loop it easier
|
|
10
11
|
interface NameTypes {
|
|
@@ -46,16 +47,7 @@ const Badges = ({ inflatable, demo, discount }: BadgeTypes) => {
|
|
|
46
47
|
return null;
|
|
47
48
|
}
|
|
48
49
|
|
|
49
|
-
|
|
50
|
-
sportSlug: string;
|
|
51
|
-
brandSlug: string;
|
|
52
|
-
baseOne: { image: PaddleGatsbyImageType };
|
|
53
|
-
baseTwo: { image: PaddleGatsbyImageType };
|
|
54
|
-
baseThree: { image: PaddleGatsbyImageType };
|
|
55
|
-
topOne: { image: PaddleGatsbyImageType };
|
|
56
|
-
topTwo: { image: PaddleGatsbyImageType };
|
|
57
|
-
topThree: { image: PaddleGatsbyImageType };
|
|
58
|
-
};
|
|
50
|
+
|
|
59
51
|
export const PaddlePurchase = ({
|
|
60
52
|
id,
|
|
61
53
|
title,
|
|
@@ -75,7 +67,7 @@ export const PaddlePurchase = ({
|
|
|
75
67
|
baseThree,
|
|
76
68
|
topOne,
|
|
77
69
|
topTwo,
|
|
78
|
-
topThree }:
|
|
70
|
+
topThree }: PaddlePurchaseAndImageTypes) => {
|
|
79
71
|
|
|
80
72
|
return (
|
|
81
73
|
<article key={id} className="purchase">
|
|
@@ -3,12 +3,24 @@ import { GatsbyImage } from "gatsby-plugin-image";
|
|
|
3
3
|
import type { PaddleGatsbyImageType } from "./types/paddle-gatsby-image-type";
|
|
4
4
|
|
|
5
5
|
type textureTypes = {
|
|
6
|
-
baseOne: {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
baseOne: {
|
|
7
|
+
image: PaddleGatsbyImageType;
|
|
8
|
+
};
|
|
9
|
+
baseTwo: {
|
|
10
|
+
image: PaddleGatsbyImageType;
|
|
11
|
+
};
|
|
12
|
+
baseThree: {
|
|
13
|
+
image: PaddleGatsbyImageType;
|
|
14
|
+
};
|
|
15
|
+
topOne: {
|
|
16
|
+
image: PaddleGatsbyImageType;
|
|
17
|
+
};
|
|
18
|
+
topTwo: {
|
|
19
|
+
image: PaddleGatsbyImageType;
|
|
20
|
+
};
|
|
21
|
+
topThree: {
|
|
22
|
+
image: PaddleGatsbyImageType;
|
|
23
|
+
};
|
|
12
24
|
};
|
|
13
25
|
export const PaddleTextureBackgrounds = ({ baseOne, baseTwo, baseThree, topOne, topTwo, topThree }: textureTypes) => {
|
|
14
26
|
const baseTextures = [
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PaddleGatsbyImageType } from "./paddle-gatsby-image-type";
|
|
2
|
+
import type { PaddlePurchaseTypes } from "./paddle-purchase-types";
|
|
3
|
+
|
|
4
|
+
export type PaddlePurchaseAndImageTypes = PaddlePurchaseTypes & {
|
|
5
|
+
baseOne: { image: PaddleGatsbyImageType };
|
|
6
|
+
baseTwo: { image: PaddleGatsbyImageType };
|
|
7
|
+
baseThree: { image: PaddleGatsbyImageType };
|
|
8
|
+
topOne: { image: PaddleGatsbyImageType };
|
|
9
|
+
topTwo: { image: PaddleGatsbyImageType };
|
|
10
|
+
topThree: { image: PaddleGatsbyImageType };
|
|
11
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PaddleGatsbyImageType } from "./paddle-gatsby-image-type";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
type BasePaddlePurchaseTypes = {
|
|
4
4
|
id: React.Key;
|
|
5
5
|
title: string;
|
|
6
6
|
slug: string;
|
|
@@ -12,10 +12,19 @@ export type PaddlePurchaseTypes = {
|
|
|
12
12
|
demo: boolean;
|
|
13
13
|
discount?: number;
|
|
14
14
|
cutout: PaddleGatsbyImageType;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
};
|
|
15
|
+
|
|
16
|
+
baseOne: { image: PaddleGatsbyImageType };
|
|
17
|
+
baseTwo: { image: PaddleGatsbyImageType };
|
|
18
|
+
baseThree: { image: PaddleGatsbyImageType };
|
|
19
|
+
topOne: { image: PaddleGatsbyImageType };
|
|
20
|
+
topTwo: { image: PaddleGatsbyImageType };
|
|
21
|
+
topThree: { image: PaddleGatsbyImageType };
|
|
21
22
|
};
|
|
23
|
+
|
|
24
|
+
export type PaddlePurchaseTypes = BasePaddlePurchaseTypes & (
|
|
25
|
+
| { sport: { slug: string }; sportSlug?: string }
|
|
26
|
+
| { sportSlug: string; sport?: { slug: string } }
|
|
27
|
+
) & (
|
|
28
|
+
| { brand: { slug: string }; brandSlug?: string }
|
|
29
|
+
| { brandSlug: string; brand?: { slug: string } }
|
|
30
|
+
);
|