@npm_leadtech/legal-lib-components 5.31.3 → 5.31.4
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/src/components/molecules/RatafiaSubscriptionCard/RatafiaSubscriptionCard.js +2 -2
- package/dist/src/components/molecules/RatafiaSubscriptionCard/RatafiaSubscriptionCard.tsx +4 -3
- package/dist/src/components/molecules/RatafiaSubscriptionCard/RatafiaSubscriptionCardProps.types.d.ts +1 -1
- package/dist/src/components/molecules/RatafiaSubscriptionCard/RatafiaSubscriptionCardProps.types.ts +1 -1
- package/package.json +1 -1
|
@@ -2,11 +2,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Button, IconSvgURLWithThemeColor, RichTextStrapi } from '../../atoms';
|
|
3
3
|
import { RatafiaSubscriptionCardStyled } from './RatafiaSubscriptionCard.styled';
|
|
4
4
|
import { stringSlugify } from '../../../utils/stringSlugify';
|
|
5
|
-
const RatafiaSubscriptionCard = ({ cardStyle, iconTitle, title, priceText, mainFeatures, AIFeatures, buttonText,
|
|
5
|
+
const RatafiaSubscriptionCard = ({ cardStyle = 'primary', iconTitle, title, priceText, mainFeatures, AIFeatures, buttonText, handleClick }) => {
|
|
6
6
|
if (!title)
|
|
7
7
|
return null;
|
|
8
8
|
const buttonStyle = cardStyle === 'Secondary' ? 'primary3' : 'primary';
|
|
9
9
|
const renderFeatures = (features, className) => features.map((feature) => (_jsxs("div", { className: `ratafia-card__feature ${className ?? ''}`, children: [feature.image?.url && _jsx(IconSvgURLWithThemeColor, { url: feature.image.url, height: '16', width: '16' }), _jsx(RichTextStrapi, { html: feature.title })] }, feature.title)));
|
|
10
|
-
return (_jsxs(RatafiaSubscriptionCardStyled, { className: `ratafia-card ${cardStyle ? stringSlugify(cardStyle) : 'primary'}`, children: [_jsxs("div", { className: 'ratafia-card__header', children: [title && (_jsxs("div", { className: 'ratafia-card__title', children: [iconTitle?.url && _jsx(IconSvgURLWithThemeColor, { url: iconTitle.url, height: '26', width: '26' }), _jsx(RichTextStrapi, { html: title })] })), priceText && _jsx("div", { className: 'ratafia-card__price-text', children: priceText })] }), _jsx("hr", {}), _jsxs("div", { className: 'ratafia-card__body', children: [mainFeatures && renderFeatures(mainFeatures, 'main-feature'), AIFeatures && renderFeatures(AIFeatures, 'ratafia-feature')] }), buttonText && (_jsx("div", { className: 'ratafia-card__footer', children: _jsx(Button, { dataQa: 'ratafia-card-button', givenClass: 'ratafia-card__button', color: buttonStyle, label: buttonText,
|
|
10
|
+
return (_jsxs(RatafiaSubscriptionCardStyled, { className: `ratafia-card ${cardStyle ? stringSlugify(cardStyle) : 'primary'}`, children: [_jsxs("div", { className: 'ratafia-card__header', children: [title && (_jsxs("div", { className: 'ratafia-card__title', children: [iconTitle?.url && _jsx(IconSvgURLWithThemeColor, { url: iconTitle.url, height: '26', width: '26' }), _jsx(RichTextStrapi, { html: title })] })), priceText && _jsx("div", { className: 'ratafia-card__price-text', children: priceText })] }), _jsx("hr", {}), _jsxs("div", { className: 'ratafia-card__body', children: [mainFeatures && renderFeatures(mainFeatures, 'main-feature'), AIFeatures && renderFeatures(AIFeatures, 'ratafia-feature')] }), buttonText && (_jsx("div", { className: 'ratafia-card__footer', children: _jsx(Button, { dataQa: 'ratafia-card-button', givenClass: 'ratafia-card__button', color: buttonStyle, label: buttonText, noLink: true, onClick: handleClick }) }))] }));
|
|
11
11
|
};
|
|
12
12
|
export default RatafiaSubscriptionCard;
|
|
@@ -6,14 +6,14 @@ import { RatafiaSubscriptionCardStyled } from './RatafiaSubscriptionCard.styled'
|
|
|
6
6
|
import { stringSlugify } from '../../../utils/stringSlugify'
|
|
7
7
|
|
|
8
8
|
const RatafiaSubscriptionCard: FC<RatafiaSubscriptionCardProps> = ({
|
|
9
|
-
cardStyle,
|
|
9
|
+
cardStyle = 'primary',
|
|
10
10
|
iconTitle,
|
|
11
11
|
title,
|
|
12
12
|
priceText,
|
|
13
13
|
mainFeatures,
|
|
14
14
|
AIFeatures,
|
|
15
15
|
buttonText,
|
|
16
|
-
|
|
16
|
+
handleClick
|
|
17
17
|
}) => {
|
|
18
18
|
if (!title) return null
|
|
19
19
|
const buttonStyle = cardStyle === 'Secondary' ? 'primary3' : 'primary'
|
|
@@ -48,7 +48,8 @@ const RatafiaSubscriptionCard: FC<RatafiaSubscriptionCardProps> = ({
|
|
|
48
48
|
givenClass='ratafia-card__button'
|
|
49
49
|
color={buttonStyle}
|
|
50
50
|
label={buttonText}
|
|
51
|
-
|
|
51
|
+
noLink
|
|
52
|
+
onClick={handleClick}
|
|
52
53
|
/>
|
|
53
54
|
</div>
|
|
54
55
|
)}
|