@slicemachine/adapter-next 0.3.18-dev-next-release.2 → 0.3.18-dev-next-release.3
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/AlternateGrid/javascript.jsx +247 -0
- package/dist/AlternateGrid/typescript.tsx +244 -0
- package/dist/CallToAction/javascript.jsx +135 -0
- package/dist/CallToAction/typescript.tsx +137 -0
- package/dist/CustomerLogos/javascript.jsx +129 -0
- package/dist/CustomerLogos/typescript.tsx +128 -0
- package/dist/Hero/javascript.jsx +207 -0
- package/dist/Hero/typescript.tsx +204 -0
- package/dist/plugin.cjs +18 -2
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.js +19 -3
- package/dist/plugin.js.map +1 -1
- package/dist/sliceTemplates/AlternateGrid/index.cjs +4 -505
- package/dist/sliceTemplates/AlternateGrid/index.cjs.map +1 -1
- package/dist/sliceTemplates/AlternateGrid/index.d.ts +2 -3
- package/dist/sliceTemplates/AlternateGrid/index.js +4 -505
- package/dist/sliceTemplates/AlternateGrid/index.js.map +1 -1
- package/dist/sliceTemplates/CallToAction/index.cjs +4 -291
- package/dist/sliceTemplates/CallToAction/index.cjs.map +1 -1
- package/dist/sliceTemplates/CallToAction/index.d.ts +2 -3
- package/dist/sliceTemplates/CallToAction/index.js +4 -291
- package/dist/sliceTemplates/CallToAction/index.js.map +1 -1
- package/dist/sliceTemplates/CustomerLogos/index.cjs +3 -275
- package/dist/sliceTemplates/CustomerLogos/index.cjs.map +1 -1
- package/dist/sliceTemplates/CustomerLogos/index.d.ts +2 -3
- package/dist/sliceTemplates/CustomerLogos/index.js +3 -275
- package/dist/sliceTemplates/CustomerLogos/index.js.map +1 -1
- package/dist/sliceTemplates/Hero/index.cjs +4 -517
- package/dist/sliceTemplates/Hero/index.cjs.map +1 -1
- package/dist/sliceTemplates/Hero/index.d.ts +2 -3
- package/dist/sliceTemplates/Hero/index.js +4 -517
- package/dist/sliceTemplates/Hero/index.js.map +1 -1
- package/package.json +3 -3
- package/src/plugin.ts +22 -2
- package/src/sliceTemplates/AlternateGrid/index.ts +5 -510
- package/src/sliceTemplates/CallToAction/index.ts +4 -298
- package/src/sliceTemplates/CustomerLogos/index.ts +3 -282
- package/src/sliceTemplates/Hero/index.ts +4 -524
- package/dist/hooks/sliceTemplateLibrary-read.cjs +0 -39
- package/dist/hooks/sliceTemplateLibrary-read.cjs.map +0 -1
- package/dist/hooks/sliceTemplateLibrary-read.d.ts +0 -3
- package/dist/hooks/sliceTemplateLibrary-read.js +0 -39
- package/dist/hooks/sliceTemplateLibrary-read.js.map +0 -1
- package/src/hooks/sliceTemplateLibrary-read.ts +0 -59
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { SharedSlice } from "@prismicio/types-internal/lib/customtypes";
|
|
2
2
|
import { SharedSliceContent } from "@prismicio/types-internal/lib/content";
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
export const screenshotPaths = {
|
|
5
|
+
default: "CallToAction/screenshot-default.png",
|
|
6
|
+
alignLeft: "CallToAction/screenshot-alignLeft.png",
|
|
7
|
+
};
|
|
7
8
|
|
|
8
9
|
export const mocks: SharedSliceContent[] = [
|
|
9
10
|
{
|
|
@@ -154,296 +155,6 @@ export const mocks: SharedSliceContent[] = [
|
|
|
154
155
|
},
|
|
155
156
|
];
|
|
156
157
|
|
|
157
|
-
export const createComponentContents = (
|
|
158
|
-
model: SharedSlice,
|
|
159
|
-
isTypeScriptProject: boolean,
|
|
160
|
-
): string => {
|
|
161
|
-
const pascalName = pascalCase(model.name);
|
|
162
|
-
|
|
163
|
-
if (isTypeScriptProject) {
|
|
164
|
-
return stripIndent`
|
|
165
|
-
import { Content, isFilled } from "@prismicio/client";
|
|
166
|
-
import { PrismicNextLink, PrismicNextImage } from "@prismicio/next";
|
|
167
|
-
import {
|
|
168
|
-
PrismicRichText,
|
|
169
|
-
PrismicText,
|
|
170
|
-
SliceComponentProps
|
|
171
|
-
} from "@prismicio/react";
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* Props for \`${pascalName}\`.
|
|
175
|
-
*/
|
|
176
|
-
export type ${pascalName}Props = SliceComponentProps<Content.${pascalName}Slice>;
|
|
177
|
-
|
|
178
|
-
/**
|
|
179
|
-
* Component for "${model.name}" Slices.
|
|
180
|
-
*/
|
|
181
|
-
const ${pascalName} = ({ slice }: ${pascalName}Props): JSX.Element => {
|
|
182
|
-
const alignment = slice.variation === "alignLeft" ? "left" : "center";
|
|
183
|
-
|
|
184
|
-
return (
|
|
185
|
-
<section
|
|
186
|
-
data-slice-type={slice.slice_type}
|
|
187
|
-
data-slice-variation={slice.variation}
|
|
188
|
-
className="es-bounded es-call-to-action"
|
|
189
|
-
>
|
|
190
|
-
<div className="es-bounded__content es-call-to-action__content">
|
|
191
|
-
{isFilled.image(slice.primary.image) && (
|
|
192
|
-
<PrismicNextImage
|
|
193
|
-
className="es-call-to-action__image"
|
|
194
|
-
field={slice.primary.image}
|
|
195
|
-
/>
|
|
196
|
-
)}
|
|
197
|
-
<div className="es-call-to-action__content">
|
|
198
|
-
{isFilled.richText(slice.primary.title) && (
|
|
199
|
-
<h2 className="es-call-to-action__content__heading">
|
|
200
|
-
<PrismicText field={slice.primary.title} />
|
|
201
|
-
</h2>
|
|
202
|
-
)}
|
|
203
|
-
{isFilled.richText(slice.primary.paragraph) && (
|
|
204
|
-
<div className="es-call-to-action__content__paragraph">
|
|
205
|
-
<PrismicRichText field={slice.primary.paragraph} />
|
|
206
|
-
</div>
|
|
207
|
-
)}
|
|
208
|
-
</div>
|
|
209
|
-
{isFilled.link(slice.primary.buttonLink) && (
|
|
210
|
-
<PrismicNextLink
|
|
211
|
-
className="es-call-to-action__button"
|
|
212
|
-
field={slice.primary.buttonLink}
|
|
213
|
-
>
|
|
214
|
-
{slice.primary.buttonLabel || "Learn more…"}
|
|
215
|
-
</PrismicNextLink>
|
|
216
|
-
)}
|
|
217
|
-
</div>
|
|
218
|
-
<style>
|
|
219
|
-
{\`
|
|
220
|
-
.es-bounded {
|
|
221
|
-
padding: 8vw 2rem;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
.es-bounded__content {
|
|
225
|
-
margin-left: auto;
|
|
226
|
-
margin-right: auto;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
@media screen and (min-width: 640px) {
|
|
230
|
-
.es-bounded__content {
|
|
231
|
-
max-width: 90%;
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
@media screen and (min-width: 896px) {
|
|
236
|
-
.es-bounded__content {
|
|
237
|
-
max-width: 80%;
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
@media screen and (min-width: 1280px) {
|
|
242
|
-
.es-bounded__content {
|
|
243
|
-
max-width: 75%;
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
.es-call-to-action {
|
|
248
|
-
background-color: #fff;
|
|
249
|
-
color: #333;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
.es-call-to-action__content {
|
|
253
|
-
display: grid;
|
|
254
|
-
gap: 2rem;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
.es-call-to-action__image {
|
|
258
|
-
max-width: 14rem;
|
|
259
|
-
height: auto;
|
|
260
|
-
width: auto;
|
|
261
|
-
justify-self: \${alignment};
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
.es-call-to-action__content {
|
|
265
|
-
display: grid;
|
|
266
|
-
gap: 1rem;
|
|
267
|
-
justify-items: \${alignment};
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
.es-call-to-action__content__heading {
|
|
271
|
-
font-size: 2rem;
|
|
272
|
-
font-weight: 700;
|
|
273
|
-
text-align: \${alignment};
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
.es-call-to-action__content__paragraph {
|
|
277
|
-
font-size: 1.15rem;
|
|
278
|
-
max-width: 38rem;
|
|
279
|
-
text-align: \${alignment};
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
.es-call-to-action__button {
|
|
283
|
-
justify-self: \${alignment};
|
|
284
|
-
border-radius: 0.25rem;
|
|
285
|
-
display: inline-block;
|
|
286
|
-
font-size: 0.875rem;
|
|
287
|
-
line-height: 1.3;
|
|
288
|
-
padding: 1rem 2.625rem;
|
|
289
|
-
text-align: \${alignment};
|
|
290
|
-
transition: background-color 100ms linear;
|
|
291
|
-
background-color: #16745f;
|
|
292
|
-
color: #fff;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
.es-call-to-action__button:hover {
|
|
296
|
-
background-color: #0d5e4c;
|
|
297
|
-
}
|
|
298
|
-
\`}
|
|
299
|
-
</style>
|
|
300
|
-
</section>
|
|
301
|
-
);
|
|
302
|
-
};
|
|
303
|
-
|
|
304
|
-
export default ${pascalName};
|
|
305
|
-
|
|
306
|
-
`;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
return stripIndent`
|
|
310
|
-
import { isFilled } from "@prismicio/client";
|
|
311
|
-
import { PrismicNextLink, PrismicNextImage } from "@prismicio/next";
|
|
312
|
-
import { PrismicRichText, PrismicText } from "@prismicio/react";
|
|
313
|
-
|
|
314
|
-
/**
|
|
315
|
-
* @typedef {import("@prismicio/client").Content.${pascalName}Slice} ${pascalName}Slice
|
|
316
|
-
* @typedef {import("@prismicio/react").SliceComponentProps<${pascalName}Slice>} ${pascalName}Props
|
|
317
|
-
* @param {${pascalName}Props}
|
|
318
|
-
*/
|
|
319
|
-
const ${pascalName} = ({ slice }) => {
|
|
320
|
-
const alignment = slice.variation === "alignLeft" ? "left" : "center";
|
|
321
|
-
|
|
322
|
-
return (
|
|
323
|
-
<section
|
|
324
|
-
data-slice-type={slice.slice_type}
|
|
325
|
-
data-slice-variation={slice.variation}
|
|
326
|
-
className="es-bounded es-call-to-action"
|
|
327
|
-
>
|
|
328
|
-
<div className="es-bounded__content es-call-to-action__content">
|
|
329
|
-
{isFilled.image(slice.primary.image) && (
|
|
330
|
-
<PrismicNextImage
|
|
331
|
-
className="es-call-to-action__image"
|
|
332
|
-
field={slice.primary.image}
|
|
333
|
-
/>
|
|
334
|
-
)}
|
|
335
|
-
<div className="es-call-to-action__content">
|
|
336
|
-
{isFilled.richText(slice.primary.title) && (
|
|
337
|
-
<h2 className="es-call-to-action__content__heading">
|
|
338
|
-
<PrismicText field={slice.primary.title} />
|
|
339
|
-
</h2>
|
|
340
|
-
)}
|
|
341
|
-
{isFilled.richText(slice.primary.paragraph) && (
|
|
342
|
-
<div className="es-call-to-action__content__paragraph">
|
|
343
|
-
<PrismicRichText field={slice.primary.paragraph} />
|
|
344
|
-
</div>
|
|
345
|
-
)}
|
|
346
|
-
</div>
|
|
347
|
-
{isFilled.link(slice.primary.buttonLink) && (
|
|
348
|
-
<PrismicNextLink
|
|
349
|
-
className="es-call-to-action__button"
|
|
350
|
-
field={slice.primary.buttonLink}
|
|
351
|
-
>
|
|
352
|
-
{slice.primary.buttonLabel || "Learn more…"}
|
|
353
|
-
</PrismicNextLink>
|
|
354
|
-
)}
|
|
355
|
-
</div>
|
|
356
|
-
<style>
|
|
357
|
-
{\`
|
|
358
|
-
.es-bounded {
|
|
359
|
-
padding: 8vw 2rem;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
.es-bounded__content {
|
|
363
|
-
margin-left: auto;
|
|
364
|
-
margin-right: auto;
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
@media screen and (min-width: 640px) {
|
|
368
|
-
.es-bounded__content {
|
|
369
|
-
max-width: 90%;
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
@media screen and (min-width: 896px) {
|
|
374
|
-
.es-bounded__content {
|
|
375
|
-
max-width: 80%;
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
@media screen and (min-width: 1280px) {
|
|
380
|
-
.es-bounded__content {
|
|
381
|
-
max-width: 75%;
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
.es-call-to-action {
|
|
386
|
-
background-color: #fff;
|
|
387
|
-
color: #333;
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
.es-call-to-action__content {
|
|
391
|
-
display: grid;
|
|
392
|
-
gap: 2rem;
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
.es-call-to-action__image {
|
|
396
|
-
max-width: 14rem;
|
|
397
|
-
height: auto;
|
|
398
|
-
width: auto;
|
|
399
|
-
justify-self: \${alignment};
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
.es-call-to-action__content {
|
|
403
|
-
display: grid;
|
|
404
|
-
gap: 1rem;
|
|
405
|
-
justify-items: \${alignment};
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
.es-call-to-action__content__heading {
|
|
409
|
-
font-size: 2rem;
|
|
410
|
-
font-weight: 700;
|
|
411
|
-
text-align: \${alignment};
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
.es-call-to-action__content__paragraph {
|
|
415
|
-
font-size: 1.15rem;
|
|
416
|
-
max-width: 38rem;
|
|
417
|
-
text-align: \${alignment};
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
.es-call-to-action__button {
|
|
421
|
-
justify-self: \${alignment};
|
|
422
|
-
border-radius: 0.25rem;
|
|
423
|
-
display: inline-block;
|
|
424
|
-
font-size: 0.875rem;
|
|
425
|
-
line-height: 1.3;
|
|
426
|
-
padding: 1rem 2.625rem;
|
|
427
|
-
text-align: \${alignment};
|
|
428
|
-
transition: background-color 100ms linear;
|
|
429
|
-
background-color: #16745f;
|
|
430
|
-
color: #fff;
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
.es-call-to-action__button:hover {
|
|
434
|
-
background-color: #0d5e4c;
|
|
435
|
-
}
|
|
436
|
-
\`}
|
|
437
|
-
</style>
|
|
438
|
-
</section>
|
|
439
|
-
);
|
|
440
|
-
};
|
|
441
|
-
|
|
442
|
-
export default ${pascalName};
|
|
443
|
-
|
|
444
|
-
`;
|
|
445
|
-
};
|
|
446
|
-
|
|
447
158
|
export const model: SharedSlice = {
|
|
448
159
|
id: "call_to_action",
|
|
449
160
|
type: "SharedSlice",
|
|
@@ -552,8 +263,3 @@ export const model: SharedSlice = {
|
|
|
552
263
|
},
|
|
553
264
|
],
|
|
554
265
|
};
|
|
555
|
-
|
|
556
|
-
export const screenshotPaths = {
|
|
557
|
-
default: "CallToAction/screenshot-default.png",
|
|
558
|
-
alignLeft: "CallToAction/screenshot-alignLeft.png",
|
|
559
|
-
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { SharedSlice } from "@prismicio/types-internal/lib/customtypes";
|
|
2
2
|
import { SharedSliceContent } from "@prismicio/types-internal/lib/content";
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
export const screenshotPaths = {
|
|
5
|
+
default: "CustomerLogos/screenshot-default.png",
|
|
6
|
+
};
|
|
7
7
|
|
|
8
8
|
export const mocks: SharedSliceContent[] = [
|
|
9
9
|
{
|
|
@@ -251,281 +251,6 @@ export const mocks: SharedSliceContent[] = [
|
|
|
251
251
|
},
|
|
252
252
|
];
|
|
253
253
|
|
|
254
|
-
export const createComponentContents = (
|
|
255
|
-
model: SharedSlice,
|
|
256
|
-
isTypeScriptProject: boolean,
|
|
257
|
-
): string => {
|
|
258
|
-
const pascalName = pascalCase(model.name);
|
|
259
|
-
|
|
260
|
-
if (isTypeScriptProject) {
|
|
261
|
-
return stripIndent`
|
|
262
|
-
import { Content, isFilled, asText } from "@prismicio/client";
|
|
263
|
-
import { PrismicNextLink, PrismicNextImage } from "@prismicio/next";
|
|
264
|
-
import { SliceComponentProps } from "@prismicio/react";
|
|
265
|
-
|
|
266
|
-
/**
|
|
267
|
-
* Props for \`${pascalName}\`.
|
|
268
|
-
*/
|
|
269
|
-
export type ${pascalName}Props = SliceComponentProps<Content.${pascalName}Slice>;
|
|
270
|
-
|
|
271
|
-
/**
|
|
272
|
-
* Component for "${model.name}" Slices.
|
|
273
|
-
*/
|
|
274
|
-
const ${pascalName} = ({ slice }: ${pascalName}Props): JSX.Element => {
|
|
275
|
-
return (
|
|
276
|
-
<section
|
|
277
|
-
data-slice-type={slice.slice_type}
|
|
278
|
-
data-slice-variation={slice.variation}
|
|
279
|
-
className="es-bounded es-customer-logos"
|
|
280
|
-
>
|
|
281
|
-
<div className="es-bounded-content es-customer-logos__content">
|
|
282
|
-
{isFilled.richText(slice.primary.eyebrowHeadline) && (
|
|
283
|
-
<h2 className="es-customer-logos__heading">
|
|
284
|
-
{asText(slice.primary.eyebrowHeadline)}
|
|
285
|
-
</h2>
|
|
286
|
-
)}
|
|
287
|
-
{slice.items.length > 0 && (
|
|
288
|
-
<ul className="es-customer-logos__logos">
|
|
289
|
-
{slice.items.map(
|
|
290
|
-
(item) =>
|
|
291
|
-
isFilled.image(item.image) && (
|
|
292
|
-
<li key={item.image.url} className="es-customer-logos__logo">
|
|
293
|
-
<PrismicNextLink
|
|
294
|
-
field={item.link}
|
|
295
|
-
className="es-customer-logos__link"
|
|
296
|
-
>
|
|
297
|
-
<PrismicNextImage
|
|
298
|
-
field={item.image}
|
|
299
|
-
height={26}
|
|
300
|
-
width={160}
|
|
301
|
-
className="es-customer-logos__logo__link__image"
|
|
302
|
-
/>
|
|
303
|
-
</PrismicNextLink>
|
|
304
|
-
</li>
|
|
305
|
-
)
|
|
306
|
-
)}
|
|
307
|
-
</ul>
|
|
308
|
-
)}
|
|
309
|
-
<PrismicNextLink
|
|
310
|
-
field={slice.primary.callToActionLink}
|
|
311
|
-
className="es-customer-logos__button"
|
|
312
|
-
>
|
|
313
|
-
{slice.primary.callToActionLabel || "Learn more..."}
|
|
314
|
-
</PrismicNextLink>
|
|
315
|
-
</div>
|
|
316
|
-
<style>
|
|
317
|
-
{\`
|
|
318
|
-
.es-bounded {
|
|
319
|
-
margin: 0px;
|
|
320
|
-
min-width: 0px;
|
|
321
|
-
position: relative;
|
|
322
|
-
padding: 8vw 1.25rem;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
.es-bounded-content {
|
|
326
|
-
min-width: 0px;
|
|
327
|
-
max-width: 90%;
|
|
328
|
-
margin: 0px auto;
|
|
329
|
-
font-family: system-ui, sans-serif;
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
.es-customer-logos {
|
|
333
|
-
background-color: #f4f0ec;
|
|
334
|
-
color: #333;
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
.es-customer-logos__content {
|
|
338
|
-
display: grid;
|
|
339
|
-
gap: 2rem;
|
|
340
|
-
justify-items: center;
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
.es-customer-logos__heading {
|
|
344
|
-
color: #8592e0;
|
|
345
|
-
font-size: 1.5rem;
|
|
346
|
-
font-weight: 500;
|
|
347
|
-
text-align: center;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
.es-customer-logos__logos {
|
|
351
|
-
display: grid;
|
|
352
|
-
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
|
|
353
|
-
grid-column-gap: 1.25rem;
|
|
354
|
-
grid-row-gap: 2rem;
|
|
355
|
-
align-items: center;
|
|
356
|
-
list-style-type: none;
|
|
357
|
-
width: 100%;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
@media (min-width: 1200px) {
|
|
361
|
-
.es-customer-logos__logos {
|
|
362
|
-
margin-left: -3rem;
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
.es-customer-logos__logo {
|
|
367
|
-
margin: 0;
|
|
368
|
-
display: flex;
|
|
369
|
-
justify-content: center;
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
@media (min-width: 1200px) {
|
|
373
|
-
.es-customer-logos__logo {
|
|
374
|
-
margin-left: 3rem;
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
.es-customer-logos__logo__link__image {
|
|
379
|
-
max-width: 10rem;
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
.es-customer-logos__button {
|
|
383
|
-
justify-self: center;
|
|
384
|
-
text-decoration: underline;
|
|
385
|
-
}
|
|
386
|
-
\`}
|
|
387
|
-
</style>
|
|
388
|
-
</section>
|
|
389
|
-
);
|
|
390
|
-
};
|
|
391
|
-
|
|
392
|
-
export default ${pascalName};
|
|
393
|
-
|
|
394
|
-
`;
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
return stripIndent`
|
|
398
|
-
import { isFilled, asText } from "@prismicio/client";
|
|
399
|
-
import { PrismicNextLink, PrismicNextImage } from "@prismicio/next";
|
|
400
|
-
|
|
401
|
-
/**
|
|
402
|
-
* @typedef {import("@prismicio/client").Content.${pascalName}Slice} ${pascalName}Slice
|
|
403
|
-
* @typedef {import("@prismicio/react").SliceComponentProps<${pascalName}Slice>} ${pascalName}Props
|
|
404
|
-
* @param {${pascalName}Props}
|
|
405
|
-
*/
|
|
406
|
-
const ${pascalName} = ({ slice }) => {
|
|
407
|
-
return (
|
|
408
|
-
<section
|
|
409
|
-
data-slice-type={slice.slice_type}
|
|
410
|
-
data-slice-variation={slice.variation}
|
|
411
|
-
className="es-bounded es-customer-logos"
|
|
412
|
-
>
|
|
413
|
-
<div className="es-bounded-content es-customer-logos__content">
|
|
414
|
-
{isFilled.richText(slice.primary.eyebrowHeadline) && (
|
|
415
|
-
<h2 className="es-customer-logos__heading">
|
|
416
|
-
{asText(slice.primary.eyebrowHeadline)}
|
|
417
|
-
</h2>
|
|
418
|
-
)}
|
|
419
|
-
{slice.items.length > 0 && (
|
|
420
|
-
<ul className="es-customer-logos__logos">
|
|
421
|
-
{slice.items.map(
|
|
422
|
-
(item) =>
|
|
423
|
-
isFilled.image(item.image) && (
|
|
424
|
-
<li key={item.image.url} className="es-customer-logos__logo">
|
|
425
|
-
<PrismicNextLink
|
|
426
|
-
field={item.link}
|
|
427
|
-
className="es-customer-logos__link"
|
|
428
|
-
>
|
|
429
|
-
<PrismicNextImage
|
|
430
|
-
field={item.image}
|
|
431
|
-
height={26}
|
|
432
|
-
width={160}
|
|
433
|
-
className="es-customer-logos__logo__link__image"
|
|
434
|
-
/>
|
|
435
|
-
</PrismicNextLink>
|
|
436
|
-
</li>
|
|
437
|
-
)
|
|
438
|
-
)}
|
|
439
|
-
</ul>
|
|
440
|
-
)}
|
|
441
|
-
<PrismicNextLink
|
|
442
|
-
field={slice.primary.callToActionLink}
|
|
443
|
-
className="es-customer-logos__button"
|
|
444
|
-
>
|
|
445
|
-
{slice.primary.callToActionLabel || "Learn more..."}
|
|
446
|
-
</PrismicNextLink>
|
|
447
|
-
</div>
|
|
448
|
-
<style>
|
|
449
|
-
{\`
|
|
450
|
-
.es-bounded {
|
|
451
|
-
margin: 0px;
|
|
452
|
-
min-width: 0px;
|
|
453
|
-
position: relative;
|
|
454
|
-
padding: 8vw 1.25rem;
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
.es-bounded-content {
|
|
458
|
-
min-width: 0px;
|
|
459
|
-
max-width: 90%;
|
|
460
|
-
margin: 0px auto;
|
|
461
|
-
font-family: system-ui, sans-serif;
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
.es-customer-logos {
|
|
465
|
-
background-color: #f4f0ec;
|
|
466
|
-
color: #333;
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
.es-customer-logos__content {
|
|
470
|
-
display: grid;
|
|
471
|
-
gap: 2rem;
|
|
472
|
-
justify-items: center;
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
.es-customer-logos__heading {
|
|
476
|
-
color: #8592e0;
|
|
477
|
-
font-size: 1.5rem;
|
|
478
|
-
font-weight: 500;
|
|
479
|
-
text-align: center;
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
.es-customer-logos__logos {
|
|
483
|
-
display: grid;
|
|
484
|
-
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
|
|
485
|
-
grid-column-gap: 1.25rem;
|
|
486
|
-
grid-row-gap: 2rem;
|
|
487
|
-
align-items: center;
|
|
488
|
-
list-style-type: none;
|
|
489
|
-
width: 100%;
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
@media (min-width: 1200px) {
|
|
493
|
-
.es-customer-logos__logos {
|
|
494
|
-
margin-left: -3rem;
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
.es-customer-logos__logo {
|
|
499
|
-
margin: 0;
|
|
500
|
-
display: flex;
|
|
501
|
-
justify-content: center;
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
@media (min-width: 1200px) {
|
|
505
|
-
.es-customer-logos__logo {
|
|
506
|
-
margin-left: 3rem;
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
.es-customer-logos__logo__link__image {
|
|
511
|
-
max-width: 10rem;
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
.es-customer-logos__button {
|
|
515
|
-
justify-self: center;
|
|
516
|
-
text-decoration: underline;
|
|
517
|
-
}
|
|
518
|
-
\`}
|
|
519
|
-
</style>
|
|
520
|
-
</section>
|
|
521
|
-
);
|
|
522
|
-
};
|
|
523
|
-
|
|
524
|
-
export default ${pascalName};
|
|
525
|
-
|
|
526
|
-
`;
|
|
527
|
-
};
|
|
528
|
-
|
|
529
254
|
export const model: SharedSlice = {
|
|
530
255
|
id: "customer_logos",
|
|
531
256
|
type: "SharedSlice",
|
|
@@ -586,7 +311,3 @@ export const model: SharedSlice = {
|
|
|
586
311
|
},
|
|
587
312
|
],
|
|
588
313
|
};
|
|
589
|
-
|
|
590
|
-
export const screenshotPaths = {
|
|
591
|
-
default: "CustomerLogos/screenshot-default.png",
|
|
592
|
-
};
|