@npm_leadtech/legal-lib-components 5.7.3 → 5.7.5
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/css/styles.css +15 -0
- package/dist/images/svg/arrow-right-24px-outlined.svg +3 -0
- package/dist/src/components/molecules/Article/Article.js +3 -2
- package/dist/src/components/molecules/Article/Article.scss +17 -0
- package/dist/src/components/molecules/Article/Article.tsx +17 -2
- package/dist/src/components/molecules/Article/ArticleProps.types.d.ts +1 -0
- package/dist/src/components/molecules/Article/ArticleProps.types.ts +1 -0
- package/dist/src/components/molecules/FaqItem/FaqItem.js +2 -2
- package/dist/src/components/molecules/FaqItem/FaqItem.tsx +2 -2
- package/dist/src/components/organisms/ArticlesList/ArticlesList.js +2 -2
- package/dist/src/components/organisms/ArticlesList/ArticlesList.tsx +2 -2
- package/dist/src/components/organisms/ArticlesList/ArticlesListProps.types.d.ts +1 -0
- package/dist/src/components/organisms/ArticlesList/ArticlesListProps.types.ts +1 -0
- package/dist/src/components/sections/BlogSection/BlogSection.js +5 -4
- package/dist/src/components/sections/BlogSection/BlogSection.scss +54 -0
- package/dist/src/components/sections/BlogSection/BlogSection.styled.js +21 -0
- package/dist/src/components/sections/BlogSection/BlogSection.styled.ts +21 -0
- package/dist/src/components/sections/BlogSection/BlogSection.tsx +10 -6
- package/dist/src/components/sections/BlogSection/BlogSectionProps.types.d.ts +2 -1
- package/dist/src/components/sections/BlogSection/BlogSectionProps.types.ts +2 -1
- package/dist/src/components/sections/WhyLawDistrictSection/WhyLawDistrictSection.js +1 -6
- package/dist/src/components/sections/WhyLawDistrictSection/WhyLawDistrictSection.tsx +2 -8
- package/dist/src/custom.d.ts +1 -1
- package/package.json +1 -1
package/dist/css/styles.css
CHANGED
|
@@ -2354,6 +2354,21 @@ h2.react-datepicker__current-month {
|
|
|
2354
2354
|
margin-top: 0;
|
|
2355
2355
|
}
|
|
2356
2356
|
}
|
|
2357
|
+
.article .information .button-image-container {
|
|
2358
|
+
align-items: center;
|
|
2359
|
+
margin: 1rem 0 2rem 0;
|
|
2360
|
+
display: flex;
|
|
2361
|
+
}
|
|
2362
|
+
.article .information .button-image-container .thinner-letter {
|
|
2363
|
+
font-family: "Inter", sans-serif;
|
|
2364
|
+
font-size: 16px;
|
|
2365
|
+
font-weight: 400;
|
|
2366
|
+
line-height: 22px;
|
|
2367
|
+
letter-spacing: -0.3px;
|
|
2368
|
+
text-align: left;
|
|
2369
|
+
margin: 0;
|
|
2370
|
+
padding: 0 1rem 0 0;
|
|
2371
|
+
}
|
|
2357
2372
|
.base-box-group {
|
|
2358
2373
|
display: block;
|
|
2359
2374
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M8.70531 0.705315C8.31578 0.31578 7.68422 0.31578 7.29468 0.705316C6.9054 1.0946 6.90511 1.72568 7.29405 2.11531L12.17 7H0.999999C0.447714 7 0 7.44772 0 8C0 8.55229 0.447715 9 1 9H12.17L7.29405 13.8847C6.90511 14.2743 6.9054 14.9054 7.29468 15.2947C7.68422 15.6842 8.31578 15.6842 8.70532 15.2947L15.2929 8.70711C15.6834 8.31658 15.6834 7.68342 15.2929 7.29289L8.70531 0.705315Z" fill="#078080"/>
|
|
3
|
+
</svg>
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import ArrowRight from '../../../../images/svg/arrow-right-24px-outlined.svg';
|
|
2
3
|
import { Button } from '../../atoms';
|
|
3
4
|
// import './Article.scss'
|
|
4
|
-
const Article = ({ imageUrl, title, articleUrl, summary }) => {
|
|
5
|
-
return (_jsxs("div", { className: 'article', children: [_jsx("img", { src: imageUrl, className: 'image', loading: 'lazy', alt: title }), _jsxs("div", { className: 'information', children: [_jsx("a", { href: articleUrl, target: '_blank', rel: 'noreferrer', children: _jsxs("p", { className: 'title sans-serif --big', children: [title, " "] }) }), _jsx("div", { className: 'summary', children: summary }), _jsx(Button, { color: 'tertiary', label: 'Read more', dataQa: 'article-read-more', link: articleUrl, isExternal: true })] })] }));
|
|
5
|
+
const Article = ({ imageUrl, title, articleUrl, summary, isCategoryProductPage }) => {
|
|
6
|
+
return (_jsxs("div", { className: 'article', children: [_jsx("img", { src: imageUrl, className: 'image', loading: 'lazy', alt: title }), _jsxs("div", { className: 'information', children: [_jsx("a", { href: articleUrl, target: '_blank', rel: 'noreferrer', children: _jsxs("p", { className: 'title sans-serif --big', children: [title, " "] }) }), _jsx("div", { className: 'summary', children: summary }), isCategoryProductPage ? (_jsxs("div", { className: 'button-image-container', children: [_jsx(Button, { givenClass: 'thinner-letter', color: 'tertiary', label: 'Read more', dataQa: 'article-read-more', link: articleUrl, isExternal: true }), _jsx("img", { className: 'article__arrow-right', src: ArrowRight, alt: '' })] })) : (_jsx(Button, { color: 'tertiary', label: 'Read more', dataQa: 'article-read-more', link: articleUrl, isExternal: true }))] })] }));
|
|
6
7
|
};
|
|
7
8
|
export default Article;
|
|
@@ -62,5 +62,22 @@
|
|
|
62
62
|
margin-top: 0;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
+
|
|
66
|
+
.button-image-container {
|
|
67
|
+
align-items: center;
|
|
68
|
+
margin: 1rem 0 2rem 0;
|
|
69
|
+
display: flex;
|
|
70
|
+
|
|
71
|
+
.thinner-letter {
|
|
72
|
+
font-family: $font-sans;
|
|
73
|
+
font-size: 16px;
|
|
74
|
+
font-weight: 400;
|
|
75
|
+
line-height: 22px;
|
|
76
|
+
letter-spacing: -0.3px;
|
|
77
|
+
text-align: left;
|
|
78
|
+
margin: 0;
|
|
79
|
+
padding: 0 1rem 0 0;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
65
82
|
}
|
|
66
83
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React, { type FC } from 'react'
|
|
2
2
|
|
|
3
|
+
import ArrowRight from '../../../../images/svg/arrow-right-24px-outlined.svg'
|
|
3
4
|
import { type ArticleProps } from './ArticleProps.types'
|
|
4
5
|
import { Button } from '../../atoms'
|
|
5
6
|
// import './Article.scss'
|
|
6
7
|
|
|
7
|
-
const Article: FC<ArticleProps> = ({ imageUrl, title, articleUrl, summary }) => {
|
|
8
|
+
const Article: FC<ArticleProps> = ({ imageUrl, title, articleUrl, summary, isCategoryProductPage }) => {
|
|
8
9
|
return (
|
|
9
10
|
<div className='article'>
|
|
10
11
|
<img src={imageUrl} className='image' loading='lazy' alt={title} />
|
|
@@ -13,7 +14,21 @@ const Article: FC<ArticleProps> = ({ imageUrl, title, articleUrl, summary }) =>
|
|
|
13
14
|
<p className='title sans-serif --big'>{title} </p>
|
|
14
15
|
</a>
|
|
15
16
|
<div className='summary'>{summary}</div>
|
|
16
|
-
|
|
17
|
+
{isCategoryProductPage ? (
|
|
18
|
+
<div className='button-image-container'>
|
|
19
|
+
<Button
|
|
20
|
+
givenClass='thinner-letter'
|
|
21
|
+
color='tertiary'
|
|
22
|
+
label={'Read more'}
|
|
23
|
+
dataQa='article-read-more'
|
|
24
|
+
link={articleUrl}
|
|
25
|
+
isExternal
|
|
26
|
+
/>
|
|
27
|
+
<img className='article__arrow-right' src={ArrowRight} alt=''></img>
|
|
28
|
+
</div>
|
|
29
|
+
) : (
|
|
30
|
+
<Button color='tertiary' label={'Read more'} dataQa='article-read-more' link={articleUrl} isExternal />
|
|
31
|
+
)}
|
|
17
32
|
</div>
|
|
18
33
|
</div>
|
|
19
34
|
)
|
|
@@ -3,8 +3,8 @@ import React from 'react';
|
|
|
3
3
|
import { ChevronRight24px } from '../../../../images/componentsSvg/ChevronRight24px';
|
|
4
4
|
// import './FaqItem.scss'
|
|
5
5
|
export const FaqItem = ({ slug, title, children, index }) => {
|
|
6
|
-
const [isOpen, setIsOpen] = React.useState(index
|
|
7
|
-
return (_jsxs("article", { className: `faqItem ${isOpen ? 'open' : ''}`, children: [_jsx("div", { id: slug, className: 'fakeAnchor' }), _jsxs("details", { itemProp: 'mainEntity', itemScope: true, itemType: 'https://www.schema.org/Question', className: 'content', open:
|
|
6
|
+
const [isOpen, setIsOpen] = React.useState(index !== 0);
|
|
7
|
+
return (_jsxs("article", { className: `faqItem ${isOpen ? 'open' : ''}`, children: [_jsx("div", { id: slug, className: 'fakeAnchor' }), _jsxs("details", { itemProp: 'mainEntity', itemScope: true, itemType: 'https://www.schema.org/Question', className: 'content', open: isOpen ? true : undefined, children: [_jsxs("summary", { role: 'button', tabIndex: index === 0 ? 0 : -1, onClick: () => {
|
|
8
8
|
setIsOpen(!isOpen);
|
|
9
9
|
}, onKeyUp: () => {
|
|
10
10
|
setIsOpen(!isOpen);
|
|
@@ -5,7 +5,7 @@ import { type FaqItemProps } from './FaqItemProps'
|
|
|
5
5
|
// import './FaqItem.scss'
|
|
6
6
|
|
|
7
7
|
export const FaqItem: React.FC<FaqItemProps> = ({ slug, title, children, index }) => {
|
|
8
|
-
const [isOpen, setIsOpen] = React.useState<boolean>(index
|
|
8
|
+
const [isOpen, setIsOpen] = React.useState<boolean>(index !== 0)
|
|
9
9
|
|
|
10
10
|
return (
|
|
11
11
|
<article className={`faqItem ${isOpen ? 'open' : ''}`}>
|
|
@@ -15,7 +15,7 @@ export const FaqItem: React.FC<FaqItemProps> = ({ slug, title, children, index }
|
|
|
15
15
|
itemScope
|
|
16
16
|
itemType='https://www.schema.org/Question'
|
|
17
17
|
className='content'
|
|
18
|
-
open={
|
|
18
|
+
open={isOpen ? true : undefined}
|
|
19
19
|
>
|
|
20
20
|
<summary
|
|
21
21
|
role='button'
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Article } from '../../molecules';
|
|
3
3
|
// import './ArticlesList.scss'
|
|
4
|
-
const ArticlesList = ({ articles = [] }) => {
|
|
4
|
+
const ArticlesList = ({ articles = [], isCategoryProductPage = false }) => {
|
|
5
5
|
if (articles?.length === 0)
|
|
6
6
|
return null;
|
|
7
|
-
return (_jsx("div", { className: 'articles_wrapper', children: articles.map((article) => (_jsx(Article, { ...article }, `article_${article?.id}`))) }));
|
|
7
|
+
return (_jsx("div", { className: 'articles_wrapper', children: articles.map((article) => (_jsx(Article, { ...article, isCategoryProductPage: isCategoryProductPage }, `article_${article?.id}`))) }));
|
|
8
8
|
};
|
|
9
9
|
export default ArticlesList;
|
|
@@ -5,13 +5,13 @@ import { Article, type ArticleProps } from '../../molecules'
|
|
|
5
5
|
import { type ArticlesListProps } from './ArticlesListProps.types'
|
|
6
6
|
// import './ArticlesList.scss'
|
|
7
7
|
|
|
8
|
-
const ArticlesList: FC<ArticlesListProps> = ({ articles = [] }) => {
|
|
8
|
+
const ArticlesList: FC<ArticlesListProps> = ({ articles = [], isCategoryProductPage = false }) => {
|
|
9
9
|
if (articles?.length === 0) return null
|
|
10
10
|
|
|
11
11
|
return (
|
|
12
12
|
<div className='articles_wrapper'>
|
|
13
13
|
{articles.map((article: ArticleProps) => (
|
|
14
|
-
<Article key={`article_${article?.id}`} {...article} />
|
|
14
|
+
<Article key={`article_${article?.id}`} {...article} isCategoryProductPage={isCategoryProductPage} />
|
|
15
15
|
))}
|
|
16
16
|
</div>
|
|
17
17
|
)
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button, RichTextStrapi } from '../../atoms';
|
|
2
3
|
import { ArticlesList } from '../../organisms';
|
|
3
4
|
import { BlogSectionStyled } from './BlogSection.styled';
|
|
4
|
-
import { Button } from '../../atoms';
|
|
5
5
|
// import './BlogSection.scss'
|
|
6
|
-
const BlogSection = ({ blogTitle, blogCta, articles }) => {
|
|
6
|
+
const BlogSection = ({ blogTitle, blogCta = null, blogDescription = null, articles }) => {
|
|
7
7
|
if (articles.articles?.length === 0)
|
|
8
|
-
return
|
|
9
|
-
|
|
8
|
+
return;
|
|
9
|
+
const categoryProductTitle = !!blogDescription;
|
|
10
|
+
return (_jsxs(BlogSectionStyled, { className: 'blog', children: [_jsx("h2", { className: `serif --super-large blog__title ${categoryProductTitle ? 'category-product-title' : ''}`, children: blogTitle }), blogDescription && _jsx(RichTextStrapi, { className: 'blog__description', html: blogDescription }), _jsx(ArticlesList, { articles: articles.articles, isCategoryProductPage: categoryProductTitle }), blogCta && _jsx(Button, { dataQa: '', color: 'secondary', label: blogCta, givenClass: 'cta-button', link: '/articles' })] }));
|
|
10
11
|
};
|
|
11
12
|
export default BlogSection;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
@import '../../../globalStyles/variables.scss';
|
|
2
|
+
@import '../../../globalStyles/mediaqueries.scss';
|
|
3
|
+
|
|
4
|
+
.blog {
|
|
5
|
+
text-align: center;
|
|
6
|
+
margin: 0 auto 3rem;
|
|
7
|
+
padding: 0 1rem;
|
|
8
|
+
max-width: $md;
|
|
9
|
+
|
|
10
|
+
@include laptop {
|
|
11
|
+
padding: 0;
|
|
12
|
+
}
|
|
13
|
+
@include desktop {
|
|
14
|
+
max-width: $lg;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.blog__description {
|
|
18
|
+
font-family: $font-sans;
|
|
19
|
+
font-size: 16px;
|
|
20
|
+
font-weight: 400;
|
|
21
|
+
line-height: 22px;
|
|
22
|
+
letter-spacing: -0.3px;
|
|
23
|
+
text-align: left;
|
|
24
|
+
color: #6d7275;
|
|
25
|
+
margin: 1rem 0 1.5rem 0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.blog__title {
|
|
29
|
+
color: var(--primary-main-dark-1);
|
|
30
|
+
|
|
31
|
+
@include laptop {
|
|
32
|
+
margin-bottom: 3rem;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&.category-product-title {
|
|
36
|
+
margin-bottom: 0;
|
|
37
|
+
font-family: $font-sans;
|
|
38
|
+
font-size: 28px;
|
|
39
|
+
font-weight: 700;
|
|
40
|
+
line-height: 32px;
|
|
41
|
+
letter-spacing: -0.3px;
|
|
42
|
+
text-align: left;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.cta-button {
|
|
47
|
+
width: 100%;
|
|
48
|
+
margin-top: 3rem;
|
|
49
|
+
display: inline-block;
|
|
50
|
+
@include landscape-tablets {
|
|
51
|
+
width: auto;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -19,6 +19,27 @@ export const BlogSectionStyled = styled.div `
|
|
|
19
19
|
@media ${device.laptop} {
|
|
20
20
|
margin-bottom: 3rem;
|
|
21
21
|
}
|
|
22
|
+
|
|
23
|
+
&.category-product-title {
|
|
24
|
+
margin-bottom: 0;
|
|
25
|
+
font-family: var(--font-sans);
|
|
26
|
+
font-size: 28px;
|
|
27
|
+
font-weight: 700;
|
|
28
|
+
line-height: 32px;
|
|
29
|
+
letter-spacing: -0.3px;
|
|
30
|
+
text-align: left;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.blog__description {
|
|
35
|
+
font-family: var(--font-sans);
|
|
36
|
+
font-size: 16px;
|
|
37
|
+
font-weight: 400;
|
|
38
|
+
line-height: 22px;
|
|
39
|
+
letter-spacing: -0.3px;
|
|
40
|
+
text-align: left;
|
|
41
|
+
color: #3d4042;
|
|
42
|
+
margin: 1rem 0 1.5rem 0;
|
|
22
43
|
}
|
|
23
44
|
|
|
24
45
|
.cta-button {
|
|
@@ -20,6 +20,27 @@ export const BlogSectionStyled = styled.div`
|
|
|
20
20
|
@media ${device.laptop} {
|
|
21
21
|
margin-bottom: 3rem;
|
|
22
22
|
}
|
|
23
|
+
|
|
24
|
+
&.category-product-title {
|
|
25
|
+
margin-bottom: 0;
|
|
26
|
+
font-family: var(--font-sans);
|
|
27
|
+
font-size: 28px;
|
|
28
|
+
font-weight: 700;
|
|
29
|
+
line-height: 32px;
|
|
30
|
+
letter-spacing: -0.3px;
|
|
31
|
+
text-align: left;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.blog__description {
|
|
36
|
+
font-family: var(--font-sans);
|
|
37
|
+
font-size: 16px;
|
|
38
|
+
font-weight: 400;
|
|
39
|
+
line-height: 22px;
|
|
40
|
+
letter-spacing: -0.3px;
|
|
41
|
+
text-align: left;
|
|
42
|
+
color: #3d4042;
|
|
43
|
+
margin: 1rem 0 1.5rem 0;
|
|
23
44
|
}
|
|
24
45
|
|
|
25
46
|
.cta-button {
|
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
2
2
|
import React, { type FC } from 'react'
|
|
3
3
|
|
|
4
|
+
import { Button, RichTextStrapi } from '../../atoms'
|
|
4
5
|
import { ArticlesList } from '../../organisms'
|
|
5
6
|
import { type BlogSectionProps } from './BlogSectionProps.types'
|
|
6
7
|
import { BlogSectionStyled } from './BlogSection.styled'
|
|
7
|
-
import { Button } from '../../atoms'
|
|
8
8
|
// import './BlogSection.scss'
|
|
9
9
|
|
|
10
|
-
const BlogSection: FC<BlogSectionProps> = ({ blogTitle, blogCta, articles }) => {
|
|
11
|
-
if (articles.articles?.length === 0) return
|
|
10
|
+
const BlogSection: FC<BlogSectionProps> = ({ blogTitle, blogCta = null, blogDescription = null, articles }) => {
|
|
11
|
+
if (articles.articles?.length === 0) return
|
|
12
|
+
const categoryProductTitle = !!blogDescription
|
|
12
13
|
|
|
13
14
|
return (
|
|
14
15
|
<BlogSectionStyled className={'blog'}>
|
|
15
|
-
<h2 className={
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
<h2 className={`serif --super-large blog__title ${categoryProductTitle ? 'category-product-title' : ''}`}>
|
|
17
|
+
{blogTitle}
|
|
18
|
+
</h2>
|
|
19
|
+
{blogDescription && <RichTextStrapi className='blog__description' html={blogDescription} />}
|
|
20
|
+
<ArticlesList articles={articles.articles} isCategoryProductPage={categoryProductTitle} />
|
|
21
|
+
{blogCta && <Button dataQa='' color='secondary' label={blogCta} givenClass='cta-button' link={'/articles'} />}
|
|
18
22
|
</BlogSectionStyled>
|
|
19
23
|
)
|
|
20
24
|
}
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect, useState } from 'react';
|
|
3
2
|
import { Button } from '../../atoms/Button';
|
|
4
3
|
import { WhyLawDistrictItems } from '../../atoms/WhyLawDistrictItems';
|
|
5
4
|
import { WhyLawDistrictSectionStyled } from './WhyLawDistrictSection.styled';
|
|
6
5
|
export const WhyLawDistrictSection = ({ title, items, userActive, link }) => {
|
|
7
6
|
if (items.length === 0)
|
|
8
7
|
return null;
|
|
9
|
-
|
|
10
|
-
useEffect(() => {
|
|
11
|
-
setIsUserActive(userActive);
|
|
12
|
-
}, [userActive]);
|
|
13
|
-
return (_jsxs(WhyLawDistrictSectionStyled, { className: 'whyLawDistrictSection', children: [_jsx("h2", { className: 'why-lawDistrict__title serif --hero', children: title }), _jsx(WhyLawDistrictItems, { items: items }), !isUserActive && (_jsx(Button, { givenClass: 'whyLawDistrictSection__button', label: link.cta, link: link.url, onClick: link.onClick, dataQa: link.dataQa, isExternal: true, hasNoFollow: true }))] }));
|
|
8
|
+
return (_jsxs(WhyLawDistrictSectionStyled, { className: 'whyLawDistrictSection', children: [_jsx("h2", { className: 'why-lawDistrict__title serif --hero', children: title }), _jsx(WhyLawDistrictItems, { items: items }), !userActive && (_jsx(Button, { givenClass: 'whyLawDistrictSection__button', label: link.cta, link: link.url, onClick: link.onClick, dataQa: link.dataQa, isExternal: true, hasNoFollow: true }))] }));
|
|
14
9
|
};
|
|
15
10
|
export default WhyLawDistrictSection;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react'
|
|
2
2
|
|
|
3
3
|
import { Button } from '../../atoms/Button'
|
|
4
4
|
import { WhyLawDistrictItems } from '../../atoms/WhyLawDistrictItems'
|
|
@@ -8,18 +8,12 @@ import { WhyLawDistrictSectionStyled } from './WhyLawDistrictSection.styled'
|
|
|
8
8
|
export const WhyLawDistrictSection: React.FC<WhyLawDistrictSectionProps> = ({ title, items, userActive, link }) => {
|
|
9
9
|
if (items.length === 0) return null
|
|
10
10
|
|
|
11
|
-
const [isUserActive, setIsUserActive] = useState(false)
|
|
12
|
-
|
|
13
|
-
useEffect(() => {
|
|
14
|
-
setIsUserActive(userActive)
|
|
15
|
-
}, [userActive])
|
|
16
|
-
|
|
17
11
|
return (
|
|
18
12
|
<WhyLawDistrictSectionStyled className={'whyLawDistrictSection'}>
|
|
19
13
|
<h2 className={'why-lawDistrict__title serif --hero'}>{title}</h2>
|
|
20
14
|
<WhyLawDistrictItems items={items} />
|
|
21
15
|
|
|
22
|
-
{!
|
|
16
|
+
{!userActive && (
|
|
23
17
|
<Button
|
|
24
18
|
givenClass='whyLawDistrictSection__button'
|
|
25
19
|
label={link.cta}
|
package/dist/src/custom.d.ts
CHANGED