@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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rileybathurst/paddle",
3
3
  "private": false,
4
- "version": "1.9.12",
4
+ "version": "1.9.14",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "tsc --noEmit && stay-gold && vite",
@@ -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="location_details">
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
- <a
211
- href={link}
212
- className="location"
213
- target="_blank"
214
- rel="noopener noreferrer"
215
- title={name}
216
- >
217
- {content}
218
- </a>
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
- <Link to={link} className="location">
221
- {content}
222
- </Link>
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
  };
@@ -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}`} rel="norel norefferer" className="button">
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
  );
@@ -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
  /*------------------*/