@treely/strapi-slices 5.1.2 → 5.2.0

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;
@@ -4593,6 +4593,35 @@ var CustomerQuoteCard = function CustomerQuoteCard(_ref) {
4593
4593
  }))));
4594
4594
  };
4595
4595
 
4596
+ var LogoCard = function LogoCard(_ref) {
4597
+ var customerStory = _ref.customerStory;
4598
+ if (customerStory.cardImage) {
4599
+ return React__default.default.createElement(boemly.Container, {
4600
+ height: "full",
4601
+ backgroundColor: "primary.50"
4602
+ }, React__default.default.createElement(boemly.Flex, {
4603
+ justifyContent: "center",
4604
+ height: "full",
4605
+ padding: "4"
4606
+ }, React__default.default.createElement(boemly.Box, {
4607
+ position: "relative",
4608
+ height: "12",
4609
+ width: "36",
4610
+ marginY: "auto"
4611
+ }, React__default.default.createElement(Link__default.default, {
4612
+ href: "/customer-stories/" + customerStory.slug
4613
+ }, React__default.default.createElement(Image__default.default, {
4614
+ src: strapiMediaUrl(customerStory.cardImage.img, 'medium'),
4615
+ alt: customerStory.cardImage.alt,
4616
+ fill: true,
4617
+ style: {
4618
+ objectFit: customerStory.cardImage.objectFit
4619
+ }
4620
+ })))));
4621
+ }
4622
+ return React__default.default.createElement(React__default.default.Fragment, null);
4623
+ };
4624
+
4596
4625
  var CustomerStories = function CustomerStories(_ref) {
4597
4626
  var slice = _ref.slice,
4598
4627
  customerStories = _ref.customerStories;
@@ -4614,6 +4643,8 @@ var CustomerStories = function CustomerStories(_ref) {
4614
4643
  customerStory: customerStory.attributes
4615
4644
  }), attributes.variant === 'quoteCard' && React__default.default.createElement(CustomerQuoteCard, {
4616
4645
  customerStory: customerStory.attributes
4646
+ }), attributes.variant === 'logoCard' && React__default.default.createElement(LogoCard, {
4647
+ customerStory: customerStory.attributes
4617
4648
  }));
4618
4649
  }))));
4619
4650
  };