@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.
- package/dist/components/LogoCard/LogoCard.d.ts +6 -0
- package/dist/components/LogoCard/index.d.ts +2 -0
- package/dist/models/strapi/StrapiCustomerStory.d.ts +1 -1
- package/dist/strapi-slices.cjs.development.js +31 -0
- package/dist/strapi-slices.cjs.development.js.map +1 -1
- package/dist/strapi-slices.cjs.production.min.js +1 -1
- package/dist/strapi-slices.cjs.production.min.js.map +1 -1
- package/dist/strapi-slices.esm.js +31 -0
- package/dist/strapi-slices.esm.js.map +1 -1
- package/dist/test/strapiMocks/strapiCustomerStory.d.ts +2 -1
- package/package.json +1 -1
- package/src/components/LogoCard/LogoCard.test.tsx +29 -0
- package/src/components/LogoCard/LogoCard.tsx +32 -0
- package/src/components/LogoCard/index.ts +3 -0
- package/src/models/strapi/StrapiCustomerStory.ts +1 -1
- package/src/slices/CustomerStories/CustomerStories.stories.tsx +18 -7
- package/src/slices/CustomerStories/CustomerStories.tsx +4 -0
- package/src/test/strapiMocks/strapiCustomerStory.ts +28 -12
|
@@ -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
|
};
|