@treely/strapi-slices 5.1.2 → 5.2.1

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.
@@ -0,0 +1,6 @@
1
+ import { StrapiCustomerStory } from '../..';
2
+ import React from 'react';
3
+ export interface LogoCardProps {
4
+ customerStory: StrapiCustomerStory;
5
+ }
6
+ export declare const LogoCard: ({ customerStory }: LogoCardProps) => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { LogoCard } from './LogoCard';
2
+ export default LogoCard;
@@ -19,6 +19,6 @@ interface StrapiCustomerStory {
19
19
  slices: any[];
20
20
  localizations: StrapiLocalization[];
21
21
  topBanner?: StrapiTopBanner;
22
- variant?: 'customerCard' | 'quoteCard';
22
+ variant?: 'customerCard' | 'quoteCard' | 'logoCard';
23
23
  }
24
24
  export default StrapiCustomerStory;
@@ -3382,7 +3382,8 @@ var Cta = function Cta(_ref) {
3382
3382
  var _useContext = React.useContext(IntlContext),
3383
3383
  formatMessage = _useContext.formatMessage;
3384
3384
  return React__default.default.createElement(boemly.DefaultSectionContainer, {
3385
- backgroundColor: VARIANTS$3[slice.variant].backgroundColor.left
3385
+ backgroundColor: VARIANTS$3[slice.variant].backgroundColor.left,
3386
+ title: slice.title
3386
3387
  }, React__default.default.createElement(boemly.Wrapper, null, slice.title ? React__default.default.createElement(React__default.default.Fragment, null, React__default.default.createElement(boemly.Flex, {
3387
3388
  alignItems: "center",
3388
3389
  flexDirection: "column"
@@ -4593,6 +4594,35 @@ var CustomerQuoteCard = function CustomerQuoteCard(_ref) {
4593
4594
  }))));
4594
4595
  };
4595
4596
 
4597
+ var LogoCard = function LogoCard(_ref) {
4598
+ var customerStory = _ref.customerStory;
4599
+ if (customerStory.cardImage) {
4600
+ return React__default.default.createElement(boemly.Container, {
4601
+ height: "full",
4602
+ backgroundColor: "primary.50"
4603
+ }, React__default.default.createElement(boemly.Flex, {
4604
+ justifyContent: "center",
4605
+ height: "full",
4606
+ padding: "4"
4607
+ }, React__default.default.createElement(boemly.Box, {
4608
+ position: "relative",
4609
+ height: "12",
4610
+ width: "36",
4611
+ marginY: "auto"
4612
+ }, React__default.default.createElement(Link__default.default, {
4613
+ href: "/customer-stories/" + customerStory.slug
4614
+ }, React__default.default.createElement(Image__default.default, {
4615
+ src: strapiMediaUrl(customerStory.cardImage.img, 'medium'),
4616
+ alt: customerStory.cardImage.alt,
4617
+ fill: true,
4618
+ style: {
4619
+ objectFit: customerStory.cardImage.objectFit
4620
+ }
4621
+ })))));
4622
+ }
4623
+ return React__default.default.createElement(React__default.default.Fragment, null);
4624
+ };
4625
+
4596
4626
  var CustomerStories = function CustomerStories(_ref) {
4597
4627
  var slice = _ref.slice,
4598
4628
  customerStories = _ref.customerStories;
@@ -4614,6 +4644,8 @@ var CustomerStories = function CustomerStories(_ref) {
4614
4644
  customerStory: customerStory.attributes
4615
4645
  }), attributes.variant === 'quoteCard' && React__default.default.createElement(CustomerQuoteCard, {
4616
4646
  customerStory: customerStory.attributes
4647
+ }), attributes.variant === 'logoCard' && React__default.default.createElement(LogoCard, {
4648
+ customerStory: customerStory.attributes
4617
4649
  }));
4618
4650
  }))));
4619
4651
  };