@npm_leadtech/legal-lib-components 5.9.3 → 5.9.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/src/components/molecules/Article/Article.js +2 -3
- package/dist/src/components/molecules/Article/Article.styled.js +0 -31
- package/dist/src/components/molecules/Article/Article.styled.ts +0 -31
- package/dist/src/components/molecules/Article/Article.tsx +4 -24
- package/dist/src/components/molecules/Article/ArticleProps.types.d.ts +0 -1
- package/dist/src/components/molecules/Article/ArticleProps.types.ts +0 -1
- package/dist/src/components/molecules/FaqItem/FaqItem.js +4 -5
- package/dist/src/components/molecules/FaqItem/FaqItem.tsx +6 -7
- 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 +0 -1
- package/dist/src/components/organisms/ArticlesList/ArticlesListProps.types.ts +0 -1
- package/dist/src/components/sections/BlogSection/BlogSection.js +4 -5
- package/dist/src/components/sections/BlogSection/BlogSection.styled.js +0 -21
- package/dist/src/components/sections/BlogSection/BlogSection.styled.ts +0 -21
- package/dist/src/components/sections/BlogSection/BlogSection.tsx +6 -10
- package/dist/src/components/sections/BlogSection/BlogSectionProps.types.d.ts +1 -2
- package/dist/src/components/sections/BlogSection/BlogSectionProps.types.ts +1 -2
- package/dist/src/components/sections/WhyLawDistrictSection/WhyLawDistrictSection.js +6 -1
- package/dist/src/components/sections/WhyLawDistrictSection/WhyLawDistrictSection.tsx +8 -2
- package/dist/src/custom.d.ts +1 -1
- package/package.json +1 -1
- package/dist/images/svg/arrow-right-24px-outlined.svg +0 -3
- package/dist/src/components/sections/BlogSection/BlogSection.scss +0 -54
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import ArrowRight from '../../../../images/svg/arrow-right-24px-outlined.svg';
|
|
3
2
|
import { ArticleStyled } from './Article.styled';
|
|
4
3
|
import { Button } from '../../atoms';
|
|
5
|
-
const Article = ({ imageUrl, title, articleUrl, summary
|
|
6
|
-
return (_jsxs(ArticleStyled, { className: 'article', children: [_jsx("img", { src: imageUrl, className:
|
|
4
|
+
const Article = ({ imageUrl, title, articleUrl, summary }) => {
|
|
5
|
+
return (_jsxs(ArticleStyled, { 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 })] })] }));
|
|
7
6
|
};
|
|
8
7
|
export default Article;
|
|
@@ -25,13 +25,6 @@ export const ArticleStyled = styled.div `
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
.image-category {
|
|
29
|
-
@media ${device['landscape-tablets']} {
|
|
30
|
-
width: 100%;
|
|
31
|
-
height: 13em;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
28
|
.information {
|
|
36
29
|
width: 100%;
|
|
37
30
|
padding: 1rem 1.5rem 0;
|
|
@@ -68,29 +61,5 @@ export const ArticleStyled = styled.div `
|
|
|
68
61
|
margin-top: 0;
|
|
69
62
|
}
|
|
70
63
|
}
|
|
71
|
-
|
|
72
|
-
.button-image-container {
|
|
73
|
-
align-items: center;
|
|
74
|
-
margin: 1rem 0 2rem 0;
|
|
75
|
-
display: flex;
|
|
76
|
-
|
|
77
|
-
.thinner-letter {
|
|
78
|
-
font-family: $font-sans;
|
|
79
|
-
font-size: 16px;
|
|
80
|
-
font-weight: 400;
|
|
81
|
-
line-height: 22px;
|
|
82
|
-
letter-spacing: -0.3px;
|
|
83
|
-
text-align: left;
|
|
84
|
-
margin: 0;
|
|
85
|
-
padding: 0 1rem 0 0;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.information-category {
|
|
91
|
-
@media ${device['landscape-tablets']} {
|
|
92
|
-
width: 100%;
|
|
93
|
-
height: auto;
|
|
94
|
-
}
|
|
95
64
|
}
|
|
96
65
|
`;
|
|
@@ -26,13 +26,6 @@ export const ArticleStyled = styled.div`
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
.image-category {
|
|
30
|
-
@media ${device['landscape-tablets']} {
|
|
31
|
-
width: 100%;
|
|
32
|
-
height: 13em;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
29
|
.information {
|
|
37
30
|
width: 100%;
|
|
38
31
|
padding: 1rem 1.5rem 0;
|
|
@@ -69,29 +62,5 @@ export const ArticleStyled = styled.div`
|
|
|
69
62
|
margin-top: 0;
|
|
70
63
|
}
|
|
71
64
|
}
|
|
72
|
-
|
|
73
|
-
.button-image-container {
|
|
74
|
-
align-items: center;
|
|
75
|
-
margin: 1rem 0 2rem 0;
|
|
76
|
-
display: flex;
|
|
77
|
-
|
|
78
|
-
.thinner-letter {
|
|
79
|
-
font-family: $font-sans;
|
|
80
|
-
font-size: 16px;
|
|
81
|
-
font-weight: 400;
|
|
82
|
-
line-height: 22px;
|
|
83
|
-
letter-spacing: -0.3px;
|
|
84
|
-
text-align: left;
|
|
85
|
-
margin: 0;
|
|
86
|
-
padding: 0 1rem 0 0;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.information-category {
|
|
92
|
-
@media ${device['landscape-tablets']} {
|
|
93
|
-
width: 100%;
|
|
94
|
-
height: auto;
|
|
95
|
-
}
|
|
96
65
|
}
|
|
97
66
|
`
|
|
@@ -1,39 +1,19 @@
|
|
|
1
1
|
import React, { type FC } from 'react'
|
|
2
2
|
|
|
3
|
-
import ArrowRight from '../../../../images/svg/arrow-right-24px-outlined.svg'
|
|
4
3
|
import { type ArticleProps } from './ArticleProps.types'
|
|
5
4
|
import { ArticleStyled } from './Article.styled'
|
|
6
5
|
import { Button } from '../../atoms'
|
|
7
6
|
|
|
8
|
-
const Article: FC<ArticleProps> = ({ imageUrl, title, articleUrl, summary
|
|
7
|
+
const Article: FC<ArticleProps> = ({ imageUrl, title, articleUrl, summary }) => {
|
|
9
8
|
return (
|
|
10
9
|
<ArticleStyled className='article'>
|
|
11
|
-
<img
|
|
12
|
-
|
|
13
|
-
className={isCategoryProductPage ? 'image image-category' : 'image'}
|
|
14
|
-
loading='lazy'
|
|
15
|
-
alt={title}
|
|
16
|
-
/>
|
|
17
|
-
<div className={isCategoryProductPage ? 'information information-category' : 'information'}>
|
|
10
|
+
<img src={imageUrl} className='image' loading='lazy' alt={title} />
|
|
11
|
+
<div className='information'>
|
|
18
12
|
<a href={articleUrl} target='_blank' rel='noreferrer'>
|
|
19
13
|
<p className='title sans-serif --big'>{title} </p>
|
|
20
14
|
</a>
|
|
21
15
|
<div className='summary'>{summary}</div>
|
|
22
|
-
{
|
|
23
|
-
<div className='button-image-container'>
|
|
24
|
-
<Button
|
|
25
|
-
givenClass='thinner-letter'
|
|
26
|
-
color='tertiary'
|
|
27
|
-
label={'Read more'}
|
|
28
|
-
dataQa='article-read-more'
|
|
29
|
-
link={articleUrl}
|
|
30
|
-
isExternal
|
|
31
|
-
/>
|
|
32
|
-
<img className='article__arrow-right' src={ArrowRight} alt=''></img>
|
|
33
|
-
</div>
|
|
34
|
-
) : (
|
|
35
|
-
<Button color='tertiary' label={'Read more'} dataQa='article-read-more' link={articleUrl} isExternal />
|
|
36
|
-
)}
|
|
16
|
+
<Button color='tertiary' label={'Read more'} dataQa='article-read-more' link={articleUrl} isExternal />
|
|
37
17
|
</div>
|
|
38
18
|
</ArticleStyled>
|
|
39
19
|
)
|
|
@@ -2,12 +2,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ChevronRight24px } from '../../../../images/componentsSvg/ChevronRight24px';
|
|
4
4
|
import { FaqItemStyled } from './FaqItem.styled';
|
|
5
|
-
export const FaqItem = ({ slug, title, children }) => {
|
|
6
|
-
const [isOpen, setIsOpen] = React.useState(
|
|
7
|
-
return (_jsxs(FaqItemStyled, { 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:
|
|
8
|
-
e.preventDefault();
|
|
5
|
+
export const FaqItem = ({ slug, title, children, index }) => {
|
|
6
|
+
const [isOpen, setIsOpen] = React.useState(index === 0);
|
|
7
|
+
return (_jsxs(FaqItemStyled, { 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: index === 0, children: [_jsxs("summary", { role: 'button', tabIndex: index === 0 ? 0 : -1, onClick: () => {
|
|
9
8
|
setIsOpen(!isOpen);
|
|
10
9
|
}, onKeyUp: () => {
|
|
11
10
|
setIsOpen(!isOpen);
|
|
12
|
-
}, className: 'question', children: [_jsx("h3", { itemProp: 'name', className: 'title', children: title }), _jsx(ChevronRight24px, {})] }), _jsx("div", { itemScope: true, itemProp: 'acceptedAnswer', itemType: 'https://www.schema.org/Answer', className: 'answer', children: _jsx("span", { itemProp: 'text', children: children }) })] })] }));
|
|
11
|
+
}, className: 'question', children: [_jsx("h3", { tabIndex: index === 0 ? 0 : -1, itemProp: 'name', className: 'title', children: title }), _jsx(ChevronRight24px, {})] }), _jsx("div", { itemScope: true, itemProp: 'acceptedAnswer', itemType: 'https://www.schema.org/Answer', className: 'answer', children: _jsx("span", { itemProp: 'text', children: children }) })] })] }));
|
|
13
12
|
};
|
|
@@ -4,8 +4,8 @@ import { ChevronRight24px } from '../../../../images/componentsSvg/ChevronRight2
|
|
|
4
4
|
import { type FaqItemProps } from './FaqItemProps'
|
|
5
5
|
import { FaqItemStyled } from './FaqItem.styled'
|
|
6
6
|
|
|
7
|
-
export const FaqItem: React.FC<FaqItemProps> = ({ slug, title, children }) => {
|
|
8
|
-
const [isOpen, setIsOpen] = React.useState<boolean>(
|
|
7
|
+
export const FaqItem: React.FC<FaqItemProps> = ({ slug, title, children, index }) => {
|
|
8
|
+
const [isOpen, setIsOpen] = React.useState<boolean>(index === 0)
|
|
9
9
|
|
|
10
10
|
return (
|
|
11
11
|
<FaqItemStyled className={`faqItem ${isOpen ? 'open' : ''}`}>
|
|
@@ -15,13 +15,12 @@ export const FaqItem: React.FC<FaqItemProps> = ({ slug, title, children }) => {
|
|
|
15
15
|
itemScope
|
|
16
16
|
itemType='https://www.schema.org/Question'
|
|
17
17
|
className='content'
|
|
18
|
-
open={
|
|
18
|
+
open={index === 0}
|
|
19
19
|
>
|
|
20
20
|
<summary
|
|
21
21
|
role='button'
|
|
22
|
-
tabIndex={
|
|
23
|
-
onClick={(
|
|
24
|
-
e.preventDefault()
|
|
22
|
+
tabIndex={index === 0 ? 0 : -1}
|
|
23
|
+
onClick={() => {
|
|
25
24
|
setIsOpen(!isOpen)
|
|
26
25
|
}}
|
|
27
26
|
onKeyUp={() => {
|
|
@@ -29,7 +28,7 @@ export const FaqItem: React.FC<FaqItemProps> = ({ slug, title, children }) => {
|
|
|
29
28
|
}}
|
|
30
29
|
className='question'
|
|
31
30
|
>
|
|
32
|
-
<h3 itemProp='name' className='title'>
|
|
31
|
+
<h3 tabIndex={index === 0 ? 0 : -1} itemProp='name' className='title'>
|
|
33
32
|
{title}
|
|
34
33
|
</h3>
|
|
35
34
|
<ChevronRight24px />
|
|
@@ -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 = [] }) => {
|
|
5
5
|
if (articles?.length === 0)
|
|
6
6
|
return null;
|
|
7
|
-
return (_jsx("div", { className: 'articles_wrapper', children: articles.map((article) => (_jsx(Article, { ...article
|
|
7
|
+
return (_jsx("div", { className: 'articles_wrapper', children: articles.map((article) => (_jsx(Article, { ...article }, `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 = [] }) => {
|
|
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} />
|
|
15
15
|
))}
|
|
16
16
|
</div>
|
|
17
17
|
)
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Button, RichTextStrapi } from '../../atoms';
|
|
3
2
|
import { ArticlesList } from '../../organisms';
|
|
4
3
|
import { BlogSectionStyled } from './BlogSection.styled';
|
|
4
|
+
import { Button } from '../../atoms';
|
|
5
5
|
// import './BlogSection.scss'
|
|
6
|
-
const BlogSection = ({ blogTitle, blogCta
|
|
6
|
+
const BlogSection = ({ blogTitle, blogCta, articles }) => {
|
|
7
7
|
if (articles.articles?.length === 0)
|
|
8
|
-
return;
|
|
9
|
-
|
|
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' })] }));
|
|
8
|
+
return null;
|
|
9
|
+
return (_jsxs(BlogSectionStyled, { className: 'blog', children: [_jsx("h2", { className: 'serif --super-large blog__title', children: blogTitle }), _jsx(ArticlesList, { articles: articles.articles }), _jsx(Button, { dataQa: '', color: 'secondary', label: blogCta, givenClass: 'cta-button', link: '/articles' })] }));
|
|
11
10
|
};
|
|
12
11
|
export default BlogSection;
|
|
@@ -19,27 +19,6 @@ 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;
|
|
43
22
|
}
|
|
44
23
|
|
|
45
24
|
.cta-button {
|
|
@@ -20,27 +20,6 @@ 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;
|
|
44
23
|
}
|
|
45
24
|
|
|
46
25
|
.cta-button {
|
|
@@ -1,24 +1,20 @@
|
|
|
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'
|
|
5
4
|
import { ArticlesList } from '../../organisms'
|
|
6
5
|
import { type BlogSectionProps } from './BlogSectionProps.types'
|
|
7
6
|
import { BlogSectionStyled } from './BlogSection.styled'
|
|
7
|
+
import { Button } from '../../atoms'
|
|
8
8
|
// import './BlogSection.scss'
|
|
9
9
|
|
|
10
|
-
const BlogSection: FC<BlogSectionProps> = ({ blogTitle, blogCta
|
|
11
|
-
if (articles.articles?.length === 0) return
|
|
12
|
-
const categoryProductTitle = !!blogDescription
|
|
10
|
+
const BlogSection: FC<BlogSectionProps> = ({ blogTitle, blogCta, articles }) => {
|
|
11
|
+
if (articles.articles?.length === 0) return null
|
|
13
12
|
|
|
14
13
|
return (
|
|
15
14
|
<BlogSectionStyled className={'blog'}>
|
|
16
|
-
<h2 className={
|
|
17
|
-
|
|
18
|
-
|
|
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'} />}
|
|
15
|
+
<h2 className={'serif --super-large blog__title'}>{blogTitle}</h2>
|
|
16
|
+
<ArticlesList articles={articles.articles} />
|
|
17
|
+
<Button dataQa='' color='secondary' label={blogCta} givenClass='cta-button' link={'/articles'} />
|
|
22
18
|
</BlogSectionStyled>
|
|
23
19
|
)
|
|
24
20
|
}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
2
3
|
import { Button } from '../../atoms/Button';
|
|
3
4
|
import { WhyLawDistrictItems } from '../../atoms/WhyLawDistrictItems';
|
|
4
5
|
import { WhyLawDistrictSectionStyled } from './WhyLawDistrictSection.styled';
|
|
5
6
|
export const WhyLawDistrictSection = ({ title, items, userActive, link }) => {
|
|
6
7
|
if (items.length === 0)
|
|
7
8
|
return null;
|
|
8
|
-
|
|
9
|
+
const [isUserActive, setIsUserActive] = useState(false);
|
|
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 }))] }));
|
|
9
14
|
};
|
|
10
15
|
export default WhyLawDistrictSection;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react'
|
|
1
|
+
import React, { useEffect, useState } from 'react'
|
|
2
2
|
|
|
3
3
|
import { Button } from '../../atoms/Button'
|
|
4
4
|
import { WhyLawDistrictItems } from '../../atoms/WhyLawDistrictItems'
|
|
@@ -8,12 +8,18 @@ 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
|
+
|
|
11
17
|
return (
|
|
12
18
|
<WhyLawDistrictSectionStyled className={'whyLawDistrictSection'}>
|
|
13
19
|
<h2 className={'why-lawDistrict__title serif --hero'}>{title}</h2>
|
|
14
20
|
<WhyLawDistrictItems items={items} />
|
|
15
21
|
|
|
16
|
-
{!
|
|
22
|
+
{!isUserActive && (
|
|
17
23
|
<Button
|
|
18
24
|
givenClass='whyLawDistrictSection__button'
|
|
19
25
|
label={link.cta}
|
package/dist/src/custom.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,3 +0,0 @@
|
|
|
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,54 +0,0 @@
|
|
|
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
|
-
}
|