@treely/strapi-slices 5.1.1 → 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 +38 -7
- 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 +38 -7
- 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/CustomerCard/CustomerCard.tsx +10 -15
- package/src/components/CustomerQuoteCard/CustomerQuoteCard.tsx +11 -6
- 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;
|
|
@@ -4541,14 +4541,14 @@ var CustomerCard = function CustomerCard(_ref) {
|
|
|
4541
4541
|
px: "6",
|
|
4542
4542
|
pt: "8",
|
|
4543
4543
|
pb: "6"
|
|
4544
|
-
}, React__default.default.createElement(boemly.Link, {
|
|
4545
|
-
href: "/customer-stories/" + customerStory.slug
|
|
4546
4544
|
}, React__default.default.createElement(boemly.Button, {
|
|
4545
|
+
as: Link__default.default,
|
|
4546
|
+
href: "/customer-stories/" + customerStory.slug,
|
|
4547
4547
|
variant: "outline",
|
|
4548
4548
|
size: "sm"
|
|
4549
4549
|
}, formatMessage({
|
|
4550
4550
|
id: 'sections.customerCard.more'
|
|
4551
|
-
})))))
|
|
4551
|
+
})))));
|
|
4552
4552
|
};
|
|
4553
4553
|
|
|
4554
4554
|
var CustomerQuoteCard = function CustomerQuoteCard(_ref) {
|
|
@@ -4582,15 +4582,44 @@ var CustomerQuoteCard = function CustomerQuoteCard(_ref) {
|
|
|
4582
4582
|
}, customerStory.quoteCardCustomerTitle)), React__default.default.createElement(boemly.Text, {
|
|
4583
4583
|
size: "xs",
|
|
4584
4584
|
color: "black"
|
|
4585
|
-
}, customerStory.quoteCardQuote), React__default.default.createElement(boemly.
|
|
4586
|
-
href: "/customer-stories/" + customerStory.slug
|
|
4587
|
-
|
|
4585
|
+
}, customerStory.quoteCardQuote), React__default.default.createElement(boemly.Button, {
|
|
4586
|
+
href: "/customer-stories/" + customerStory.slug,
|
|
4587
|
+
as: Link__default.default,
|
|
4588
4588
|
variant: "outline",
|
|
4589
4589
|
size: "sm",
|
|
4590
4590
|
mt: "8"
|
|
4591
4591
|
}, formatMessage({
|
|
4592
4592
|
id: 'sections.customerQuoteCard.more'
|
|
4593
|
-
}))))
|
|
4593
|
+
}))));
|
|
4594
|
+
};
|
|
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);
|
|
4594
4623
|
};
|
|
4595
4624
|
|
|
4596
4625
|
var CustomerStories = function CustomerStories(_ref) {
|
|
@@ -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
|
};
|