@npm_leadtech/legal-lib-components 5.12.12 → 5.12.14
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/SubtypeDocumentCard/SubtypeDocumentCard.styled.js +3 -2
- package/dist/src/components/molecules/SubtypeDocumentCard/SubtypeDocumentCard.styled.ts +3 -2
- package/dist/src/components/sections/WhyLawDistrictSection/WhyLawDistrictSection.js +6 -1
- package/dist/src/components/sections/WhyLawDistrictSection/WhyLawDistrictSection.tsx +8 -2
- package/package.json +1 -1
|
@@ -6,7 +6,8 @@ export const SubtypeDocumentCardStyled = styled.div `
|
|
|
6
6
|
width: 100%;
|
|
7
7
|
align-items: center;
|
|
8
8
|
justify-content: center;
|
|
9
|
-
width:
|
|
9
|
+
width: 100%;
|
|
10
|
+
max-width: 376px;
|
|
10
11
|
min-height: 600px;
|
|
11
12
|
padding: 32px 24px 32px 24px;
|
|
12
13
|
gap: 24px;
|
|
@@ -21,7 +22,7 @@ export const SubtypeDocumentCardStyled = styled.div `
|
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
@media (min-width: ${size.xs}) {
|
|
24
|
-
width:
|
|
25
|
+
width: 400px;
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
@media (min-width: ${size.md}) {
|
|
@@ -7,7 +7,8 @@ export const SubtypeDocumentCardStyled = styled.div`
|
|
|
7
7
|
width: 100%;
|
|
8
8
|
align-items: center;
|
|
9
9
|
justify-content: center;
|
|
10
|
-
width:
|
|
10
|
+
width: 100%;
|
|
11
|
+
max-width: 376px;
|
|
11
12
|
min-height: 600px;
|
|
12
13
|
padding: 32px 24px 32px 24px;
|
|
13
14
|
gap: 24px;
|
|
@@ -22,7 +23,7 @@ export const SubtypeDocumentCardStyled = styled.div`
|
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
@media (min-width: ${size.xs}) {
|
|
25
|
-
width:
|
|
26
|
+
width: 400px;
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
@media (min-width: ${size.md}) {
|
|
@@ -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}
|