@npm_leadtech/legal-lib-components 5.14.10 → 5.14.11
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/sections/LayoutRatafiaSection/LayoutRatafiaSection.js +2 -3
- package/dist/src/components/sections/LayoutRatafiaSection/LayoutRatafiaSection.styled.js +1 -1
- package/dist/src/components/sections/LayoutRatafiaSection/LayoutRatafiaSection.styled.ts +1 -1
- package/dist/src/components/sections/LayoutRatafiaSection/LayoutRatafiaSection.tsx +10 -9
- package/dist/src/components/sections/LayoutRatafiaSection/LayoutRatafiaSectionProps.types.d.ts +3 -1
- package/dist/src/components/sections/LayoutRatafiaSection/LayoutRatafiaSectionProps.types.ts +3 -1
- package/package.json +1 -1
|
@@ -3,11 +3,10 @@ import { Button } from '../../atoms';
|
|
|
3
3
|
import { LayoutRatafiaSectionStyled } from './LayoutRatafiaSection.styled';
|
|
4
4
|
import { TagsRatafiaList } from '../../molecules';
|
|
5
5
|
import { useIsMobileOrTable } from '../../../hooks';
|
|
6
|
-
const LayoutRatafiaSection = ({ title, children, tags, ctaLabel, ctaLink, ctaDataQa,
|
|
6
|
+
const LayoutRatafiaSection = ({ title, children, tags = [], ctaLabel, ctaLink = '#', handleOnClick, ctaDataQa = 'ai-section-cta', image }) => {
|
|
7
7
|
const { isMobile } = useIsMobileOrTable();
|
|
8
8
|
if (children == undefined)
|
|
9
9
|
return null;
|
|
10
|
-
|
|
11
|
-
return (_jsx(LayoutRatafiaSectionStyled, { className: 'layout-ratafia-section', children: _jsxs("div", { className: 'layout-ratafia-section__wrapper background-ratafia-animation', children: [_jsxs("div", { className: 'layout-ratafia-section__wrapper__info', children: [_jsxs("div", { className: 'layout-ratafia-section__wrapper__info__paragraph', children: [title && (_jsx("h2", { className: 'layout-ratafia-section__wrapper__info__paragraph__title sans-serif --super-large --bold-weight', children: title })), _jsx("div", { className: 'layout-ratafia-section__wrapper__info__paragraph__content sans-serif --super-medium', children: children })] }), tags?.length && (_jsx("div", { className: 'layout-ratafia-section__wrapper__info__tags', children: _jsx(TagsRatafiaList, { tags: tags }) })), ctaLabel && (_jsx("div", { className: 'layout-ratafia-section__wrapper__info__button', children: _jsx(Button, { givenClass: 'mid-banner-ratafia-content__cta', dataQa: ctaDataQa ?? 'layout-ratafia-cta', link: ctaLink ?? '#', color: 'primary', label: ctaLabel, fluid: isMobile }) }))] }), existMediaNode && _jsx("div", { className: 'layout-ratafia-section__wrapper__media', children: media })] }) }));
|
|
10
|
+
return (_jsx(LayoutRatafiaSectionStyled, { className: 'layout-ratafia-section', children: _jsxs("div", { className: 'layout-ratafia-section__wrapper background-ratafia-animation', children: [_jsxs("div", { className: 'layout-ratafia-section__wrapper__info', children: [_jsxs("div", { className: 'layout-ratafia-section__wrapper__info__paragraph', children: [title && (_jsx("h2", { className: 'layout-ratafia-section__wrapper__info__paragraph__title sans-serif --super-large --bold-weight', children: title })), _jsx("div", { className: 'layout-ratafia-section__wrapper__info__paragraph__content sans-serif --super-medium', children: children })] }), tags?.length > 0 && (_jsx("div", { className: 'layout-ratafia-section__wrapper__info__tags', children: _jsx(TagsRatafiaList, { tags: tags }) })), ctaLabel && (_jsx("div", { className: 'layout-ratafia-section__wrapper__info__button', children: _jsx(Button, { givenClass: 'mid-banner-ratafia-content__cta', dataQa: ctaDataQa, link: ctaLink, onClick: handleOnClick, color: 'primary', label: ctaLabel, fluid: isMobile }) }))] }), image !== null && _jsx("div", { className: 'layout-ratafia-section__wrapper__image', children: image })] }) }));
|
|
12
11
|
};
|
|
13
12
|
export default LayoutRatafiaSection;
|
|
@@ -9,16 +9,16 @@ import { useIsMobileOrTable } from '../../../hooks'
|
|
|
9
9
|
const LayoutRatafiaSection: FC<LayoutRatafiaSectionProps> = ({
|
|
10
10
|
title,
|
|
11
11
|
children,
|
|
12
|
-
tags,
|
|
12
|
+
tags = [],
|
|
13
13
|
ctaLabel,
|
|
14
|
-
ctaLink,
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
ctaLink = '#',
|
|
15
|
+
handleOnClick,
|
|
16
|
+
ctaDataQa = 'ai-section-cta',
|
|
17
|
+
image
|
|
17
18
|
}) => {
|
|
18
19
|
const { isMobile } = useIsMobileOrTable()
|
|
19
20
|
if (children == undefined) return null
|
|
20
21
|
|
|
21
|
-
const existMediaNode = media !== undefined
|
|
22
22
|
return (
|
|
23
23
|
<LayoutRatafiaSectionStyled className='layout-ratafia-section'>
|
|
24
24
|
<div className='layout-ratafia-section__wrapper background-ratafia-animation'>
|
|
@@ -33,7 +33,7 @@ const LayoutRatafiaSection: FC<LayoutRatafiaSectionProps> = ({
|
|
|
33
33
|
{children}
|
|
34
34
|
</div>
|
|
35
35
|
</div>
|
|
36
|
-
{tags?.length && (
|
|
36
|
+
{tags?.length > 0 && (
|
|
37
37
|
<div className='layout-ratafia-section__wrapper__info__tags'>
|
|
38
38
|
<TagsRatafiaList tags={tags} />
|
|
39
39
|
</div>
|
|
@@ -42,8 +42,9 @@ const LayoutRatafiaSection: FC<LayoutRatafiaSectionProps> = ({
|
|
|
42
42
|
<div className='layout-ratafia-section__wrapper__info__button'>
|
|
43
43
|
<Button
|
|
44
44
|
givenClass='mid-banner-ratafia-content__cta'
|
|
45
|
-
dataQa={ctaDataQa
|
|
46
|
-
link={ctaLink
|
|
45
|
+
dataQa={ctaDataQa}
|
|
46
|
+
link={ctaLink}
|
|
47
|
+
onClick={handleOnClick}
|
|
47
48
|
color='primary'
|
|
48
49
|
label={ctaLabel}
|
|
49
50
|
fluid={isMobile}
|
|
@@ -51,7 +52,7 @@ const LayoutRatafiaSection: FC<LayoutRatafiaSectionProps> = ({
|
|
|
51
52
|
</div>
|
|
52
53
|
)}
|
|
53
54
|
</div>
|
|
54
|
-
{
|
|
55
|
+
{image !== null && <div className='layout-ratafia-section__wrapper__image'>{image}</div>}
|
|
55
56
|
</div>
|
|
56
57
|
</LayoutRatafiaSectionStyled>
|
|
57
58
|
)
|
package/dist/src/components/sections/LayoutRatafiaSection/LayoutRatafiaSectionProps.types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MouseEventHandler } from 'react';
|
|
1
2
|
import { TagRatafiaItemProps } from 'src/components/atoms';
|
|
2
3
|
export interface LayoutRatafiaSectionProps {
|
|
3
4
|
title?: string;
|
|
@@ -5,6 +6,7 @@ export interface LayoutRatafiaSectionProps {
|
|
|
5
6
|
tags?: TagRatafiaItemProps[];
|
|
6
7
|
ctaLabel?: string;
|
|
7
8
|
ctaLink?: string;
|
|
9
|
+
handleOnClick?: MouseEventHandler;
|
|
8
10
|
ctaDataQa?: string;
|
|
9
|
-
|
|
11
|
+
image?: React.ReactNode;
|
|
10
12
|
}
|
package/dist/src/components/sections/LayoutRatafiaSection/LayoutRatafiaSectionProps.types.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MouseEventHandler } from 'react'
|
|
1
2
|
import { TagRatafiaItemProps } from 'src/components/atoms'
|
|
2
3
|
|
|
3
4
|
export interface LayoutRatafiaSectionProps {
|
|
@@ -6,6 +7,7 @@ export interface LayoutRatafiaSectionProps {
|
|
|
6
7
|
tags?: TagRatafiaItemProps[]
|
|
7
8
|
ctaLabel?: string
|
|
8
9
|
ctaLink?: string
|
|
10
|
+
handleOnClick?: MouseEventHandler
|
|
9
11
|
ctaDataQa?: string
|
|
10
|
-
|
|
12
|
+
image?: React.ReactNode
|
|
11
13
|
}
|