@rileybathurst/paddle 1.9.12 → 1.9.14
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/paddle-location.tsx +25 -16
- package/src/paddle-purchase.tsx +0 -2
- package/src/phone.tsx +4 -1
- package/src/styles/layout.css +24 -0
package/package.json
CHANGED
package/src/paddle-location.tsx
CHANGED
|
@@ -119,12 +119,12 @@ const Content = ({
|
|
|
119
119
|
phone,
|
|
120
120
|
}: ContentTypes) => {
|
|
121
121
|
return (
|
|
122
|
-
|
|
122
|
+
<React.Fragment>
|
|
123
123
|
<div className="svg">
|
|
124
124
|
<SVG src={svg} />
|
|
125
125
|
</div>
|
|
126
126
|
|
|
127
|
-
<div className="
|
|
127
|
+
<div className="location-details">
|
|
128
128
|
<h3>{name}</h3>
|
|
129
129
|
|
|
130
130
|
{streetAddress ||
|
|
@@ -161,7 +161,7 @@ const Content = ({
|
|
|
161
161
|
<Phone phone={phone} />
|
|
162
162
|
)}
|
|
163
163
|
</div>
|
|
164
|
-
|
|
164
|
+
</React.Fragment>
|
|
165
165
|
);
|
|
166
166
|
};
|
|
167
167
|
|
|
@@ -202,23 +202,32 @@ export const PaddleLocation = ({
|
|
|
202
202
|
season_end={season_end}
|
|
203
203
|
offSeasonDetails={offSeasonDetails}
|
|
204
204
|
weatherPermitting={weatherPermitting}
|
|
205
|
-
phone={phoneDidgits}
|
|
206
205
|
/>
|
|
207
206
|
);
|
|
208
207
|
|
|
209
208
|
return link.includes("http") ? (
|
|
210
|
-
<
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
209
|
+
<div className={`location-wrapper ${phone ? 'phone-spacer' : ''}`}>
|
|
210
|
+
<a
|
|
211
|
+
href={link}
|
|
212
|
+
className="location"
|
|
213
|
+
target="_blank"
|
|
214
|
+
rel="noopener noreferrer"
|
|
215
|
+
title={name}
|
|
216
|
+
>
|
|
217
|
+
{content}
|
|
218
|
+
</a>
|
|
219
|
+
{phone && (
|
|
220
|
+
<Phone phone={phoneDidgits} />
|
|
221
|
+
)}
|
|
222
|
+
</div>
|
|
219
223
|
) : (
|
|
220
|
-
<
|
|
221
|
-
{
|
|
222
|
-
|
|
224
|
+
<div className={`location-wrapper ${phone ? 'phone-spacer' : ''}`}>
|
|
225
|
+
<Link to={link} className="location">
|
|
226
|
+
{content}
|
|
227
|
+
</Link>
|
|
228
|
+
{phone && (
|
|
229
|
+
<Phone phone={phoneDidgits} />
|
|
230
|
+
)}
|
|
231
|
+
</div>
|
|
223
232
|
);
|
|
224
233
|
};
|
package/src/paddle-purchase.tsx
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Link } from "gatsby";
|
|
3
3
|
import { GatsbyImage } from "gatsby-plugin-image";
|
|
4
|
-
import type { PaddleGatsbyImageType } from "./types/paddle-gatsby-image-type";
|
|
5
4
|
import { PaddleInchesRemainder } from "./paddle-inches-remainder";
|
|
6
5
|
import { PaddleTextureBackgrounds } from "./paddle-texture-backgrounds";
|
|
7
|
-
import { PaddlePurchaseTypes } from "./types/paddle-purchase-types";
|
|
8
6
|
import { PaddlePurchaseAndImageTypes } from "./types/paddle-purchase-image-types";
|
|
9
7
|
|
|
10
8
|
// TODO: I'm not sure if this is needed or I can loop it easier
|
package/src/phone.tsx
CHANGED
|
@@ -19,7 +19,10 @@ type PhoneTypes = {
|
|
|
19
19
|
|
|
20
20
|
const Phone = ({ phone }: PhoneTypes) => {
|
|
21
21
|
return (
|
|
22
|
-
<a href={`tel:${phone}`}
|
|
22
|
+
<a href={`tel:${phone}`}
|
|
23
|
+
rel="noopener noreferrer"
|
|
24
|
+
className="button location-phone"
|
|
25
|
+
>
|
|
23
26
|
Phone: <FormatPhoneNumber phoneNumberString={phone} />
|
|
24
27
|
</a>
|
|
25
28
|
);
|
package/src/styles/layout.css
CHANGED
|
@@ -409,12 +409,23 @@ header {
|
|
|
409
409
|
|
|
410
410
|
.location-deck {
|
|
411
411
|
margin-block-end: var(--kilimanjaro);
|
|
412
|
+
display: flex;
|
|
413
|
+
flex-direction: column;
|
|
414
|
+
gap: var(--vinson);
|
|
412
415
|
}
|
|
413
416
|
|
|
414
417
|
.location:not(:last-child) {
|
|
415
418
|
margin-block-end: var(--kosciuszko);
|
|
416
419
|
}
|
|
417
420
|
|
|
421
|
+
.location-wrapper {
|
|
422
|
+
display: grid;
|
|
423
|
+
|
|
424
|
+
> * {
|
|
425
|
+
grid-column: 1;
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
|
|
418
429
|
.location {
|
|
419
430
|
display: flex;
|
|
420
431
|
flex-flow: row;
|
|
@@ -442,6 +453,19 @@ header {
|
|
|
442
453
|
}
|
|
443
454
|
}
|
|
444
455
|
|
|
456
|
+
/* * this whole things works but is kinda a hack */
|
|
457
|
+
/* It works around having a nested link in a link */
|
|
458
|
+
.location-wrapper.phone-spacer .location {
|
|
459
|
+
grid-row: 1/3;
|
|
460
|
+
padding-block-end: 6.5rem; /* this is a guess and check, it needs to be big enough to accomodate the phone number but not too big that it looks weird when there is no phone number */
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
.button.location-phone {
|
|
464
|
+
grid-row: 2;
|
|
465
|
+
margin-inline-start: 5.5rem;
|
|
466
|
+
margin-block-end: 2.5rem;
|
|
467
|
+
}
|
|
468
|
+
|
|
445
469
|
/*------------------*/
|
|
446
470
|
/* #COMPOSITION */
|
|
447
471
|
/*------------------*/
|