@npm_leadtech/legal-lib-components 5.11.13 → 5.11.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.
Files changed (100) hide show
  1. package/dist/css/styles.css +25 -2
  2. package/dist/images/png/preview-doc.png +0 -0
  3. package/dist/src/components/atoms/Button/Button.js +2 -1
  4. package/dist/src/components/atoms/Button/Button.scss +31 -1
  5. package/dist/src/components/atoms/Button/Button.tsx +2 -2
  6. package/dist/src/components/atoms/Button/ButtonProps.types.d.ts +1 -1
  7. package/dist/src/components/atoms/Button/ButtonProps.types.ts +1 -0
  8. package/dist/src/components/atoms/CardPane/CardPane.tsx +0 -1
  9. package/dist/src/components/atoms/CardPane/CardPaneInfo.tsx +0 -2
  10. package/dist/src/components/atoms/DatePickerCustom/DatePickerCustom.js +0 -4
  11. package/dist/src/components/atoms/DatePickerCustom/DatePickerCustom.tsx +0 -4
  12. package/dist/src/components/atoms/DatePickerCustom/index.js.map +2 -2
  13. package/dist/src/components/atoms/DialogMenuIcon/DialogMenuIcon.js +0 -3
  14. package/dist/src/components/atoms/DialogMenuIcon/DialogMenuIcon.tsx +0 -4
  15. package/dist/src/components/atoms/Disclaimer/Disclaimer.js +0 -1
  16. package/dist/src/components/atoms/Disclaimer/Disclaimer.tsx +0 -1
  17. package/dist/src/components/atoms/DisclaimerRatafia/DisclaimerRatafia.js +0 -1
  18. package/dist/src/components/atoms/DisclaimerRatafia/DisclaimerRatafia.tsx +0 -1
  19. package/dist/src/components/atoms/Divider/Divider.tsx +0 -2
  20. package/dist/src/components/atoms/GoogleButton/GoogleButton.tsx +0 -1
  21. package/dist/src/components/atoms/IconImage/IconImage.tsx +0 -1
  22. package/dist/src/components/atoms/IconSvgURLWithThemeColor/IconSvgURLWithThemeColor.tsx +0 -1
  23. package/dist/src/components/atoms/IconTextInfoSection/IconTextInfoSection.js +0 -1
  24. package/dist/src/components/atoms/IconTextInfoSection/IconTextInfoSection.tsx +0 -1
  25. package/dist/src/components/atoms/InfoBox/InfoBox.tsx +0 -2
  26. package/dist/src/components/atoms/Logo/Logo.tsx +1 -2
  27. package/dist/src/components/atoms/MenuItems/MenuItems.js +0 -3
  28. package/dist/src/components/atoms/MenuItems/MenuItems.tsx +0 -3
  29. package/dist/src/components/atoms/MessageInformation/MessageInformation.tsx +0 -1
  30. package/dist/src/components/atoms/PaypalButton/PaypalButton.tsx +0 -1
  31. package/dist/src/components/atoms/ProgressBar/ProgressBar.tsx +0 -1
  32. package/dist/src/components/atoms/Radio/Radio.tsx +0 -3
  33. package/dist/src/components/atoms/RemoveButton/RemoveButton.tsx +0 -1
  34. package/dist/src/components/atoms/RichTextStrapi/useFormattedText.js +0 -1
  35. package/dist/src/components/atoms/RichTextStrapi/useFormattedText.tsx +0 -1
  36. package/dist/src/components/atoms/SearchSelect/SearchSelect.tsx +0 -4
  37. package/dist/src/components/atoms/SidemenuTab/SidemenuTab.tsx +0 -2
  38. package/dist/src/components/atoms/TestAB/TestAB.js +0 -3
  39. package/dist/src/components/atoms/TestAB/TestAB.tsx +0 -3
  40. package/dist/src/components/atoms/TextArea/TextArea.tsx +0 -1
  41. package/dist/src/components/molecules/AccordionItem/AccordionItem.js +0 -1
  42. package/dist/src/components/molecules/AccordionItem/AccordionItem.tsx +0 -1
  43. package/dist/src/components/molecules/BottomFixedBar/BottomFixedBar.tsx +0 -1
  44. package/dist/src/components/molecules/CountDownMessage/CountDownMessage.js +0 -1
  45. package/dist/src/components/molecules/CountDownMessage/CountDownMessage.tsx +0 -1
  46. package/dist/src/components/molecules/Feedback/Feedback.tsx +0 -1
  47. package/dist/src/components/molecules/FreeDocModalContent/FreeDocModalContent.tsx +0 -1
  48. package/dist/src/components/molecules/MenuItemsSection/MenuItemsSection.tsx +0 -1
  49. package/dist/src/components/molecules/NavBarDropDown/NavBarDropDown.js +0 -2
  50. package/dist/src/components/molecules/NavBarDropDown/NavBarDropDown.tsx +1 -2
  51. package/dist/src/components/molecules/Pagination/PageStepControl.js +0 -1
  52. package/dist/src/components/molecules/Pagination/PageStepControl.tsx +0 -1
  53. package/dist/src/components/molecules/Pagination/PageSteps.tsx +0 -1
  54. package/dist/src/components/molecules/Pagination/Pagination.js +0 -1
  55. package/dist/src/components/molecules/Pagination/Pagination.tsx +0 -1
  56. package/dist/src/components/molecules/PhoneContactBoxDesktop/PhoneContactBoxDesktop.tsx +0 -2
  57. package/dist/src/components/molecules/PhoneContactBoxMobile/PhoneContactBoxMobile.tsx +0 -1
  58. package/dist/src/components/molecules/PricingCard/PricingCard.js +0 -1
  59. package/dist/src/components/molecules/PricingCard/PricingCard.tsx +0 -1
  60. package/dist/src/components/molecules/Snackbar/Snackbar.js +0 -1
  61. package/dist/src/components/molecules/Snackbar/Snackbar.tsx +0 -1
  62. package/dist/src/components/molecules/SubtypeDocumentCard/SubtypeDocumentCard.d.ts +4 -0
  63. package/dist/src/components/molecules/SubtypeDocumentCard/SubtypeDocumentCard.js +7 -0
  64. package/dist/src/components/molecules/SubtypeDocumentCard/SubtypeDocumentCard.styled.d.ts +1 -0
  65. package/dist/src/components/molecules/SubtypeDocumentCard/SubtypeDocumentCard.styled.js +161 -0
  66. package/dist/src/components/molecules/SubtypeDocumentCard/SubtypeDocumentCard.styled.ts +162 -0
  67. package/dist/src/components/molecules/SubtypeDocumentCard/SubtypeDocumentCard.tsx +37 -0
  68. package/dist/src/components/molecules/SubtypeDocumentCard/SubtypeDocumentCardProps.types.d.ts +10 -0
  69. package/dist/src/components/molecules/SubtypeDocumentCard/SubtypeDocumentCardProps.types.js +1 -0
  70. package/dist/src/components/molecules/SubtypeDocumentCard/SubtypeDocumentCardProps.types.ts +11 -0
  71. package/dist/src/components/molecules/SubtypeDocumentCard/index.d.ts +2 -0
  72. package/dist/src/components/molecules/SubtypeDocumentCard/index.js +1 -0
  73. package/dist/src/components/molecules/SubtypeDocumentCard/index.ts +2 -0
  74. package/dist/src/components/molecules/TextInput/Input.js +0 -1
  75. package/dist/src/components/molecules/TextInput/Input.tsx +1 -1
  76. package/dist/src/components/molecules/TextInput/TextInput.js +0 -2
  77. package/dist/src/components/molecules/TextInput/TextInput.tsx +0 -2
  78. package/dist/src/components/molecules/TextInput/TextInputMessage.tsx +0 -1
  79. package/dist/src/components/molecules/TextInput/TextInputTooltip.tsx +0 -1
  80. package/dist/src/components/molecules/TypeModulesList/TypeModulesList.tsx +0 -1
  81. package/dist/src/components/molecules/index.d.ts +1 -0
  82. package/dist/src/components/molecules/index.js +1 -0
  83. package/dist/src/components/molecules/index.ts +1 -0
  84. package/dist/src/components/organisms/Accordion/Accordion.context.js +0 -1
  85. package/dist/src/components/organisms/Accordion/Accordion.context.tsx +0 -1
  86. package/dist/src/components/organisms/Accordion/Accordion.js +0 -1
  87. package/dist/src/components/organisms/Accordion/Accordion.tsx +0 -1
  88. package/dist/src/components/organisms/ArticlesList/ArticlesList.tsx +0 -1
  89. package/dist/src/components/organisms/GuidelinesContent/GuidelinesContent.tsx +0 -1
  90. package/dist/src/components/organisms/MobileBottomBar/MobileBottomBar.tsx +0 -1
  91. package/dist/src/components/pages/AboutUsPage/AboutUsPage.tsx +0 -1
  92. package/dist/src/components/sections/AboutUsSection/AboutUsSection.tsx +0 -1
  93. package/dist/src/components/sections/AsideMenuSection/AsideMenuSection.tsx +1 -0
  94. package/dist/src/components/sections/BlogSection/BlogSection.tsx +0 -1
  95. package/dist/src/components/sections/HowGetYourFormsSection/HowGetYourFormsSection.tsx +0 -1
  96. package/dist/src/components/sections/PeopleSayAboutUsSection/PeopleSayAboutUsSection.tsx +1 -1
  97. package/dist/src/components/sections/WhyLawDistrictSection/WhyLawDistrictSection.js +6 -1
  98. package/dist/src/components/sections/WhyLawDistrictSection/WhyLawDistrictSection.tsx +8 -2
  99. package/dist/tsconfig.build.tsbuildinfo +1 -1
  100. package/package.json +5 -1
@@ -0,0 +1,162 @@
1
+ import { device, size } from '../../../globalStyles/breakpoints'
2
+ import styled from 'styled-components'
3
+
4
+ export const SubtypeDocumentCardStyled = styled.div`
5
+ display: flex;
6
+ flex-direction: column;
7
+ width: 100%;
8
+ align-items: center;
9
+ justify-content: center;
10
+ width: 100%;
11
+ max-width: 376px;
12
+ min-height: 600px;
13
+ padding: 32px 24px 32px 24px;
14
+ gap: 24px;
15
+ border-radius: 4px 0px 0px 0px;
16
+ opacity: 0px;
17
+ box-shadow: 0px 2px 6px 0px var(--neutral-neutral-3);
18
+ background-color: var(--secondary-main-light-5);
19
+ margin-bottom: 1.5rem;
20
+
21
+ .image-container {
22
+ width: 70%;
23
+ }
24
+
25
+ @media (min-width: ${size.xs}) {
26
+ width: 400px;
27
+ max-width: inherit;
28
+ }
29
+
30
+ @media (min-width: ${size.md}) {
31
+ width: 543px;
32
+ height: 364px;
33
+ min-height: 380px;
34
+ align-items: flex-start;
35
+ flex-direction: row;
36
+
37
+ .image-container {
38
+ width: 40%;
39
+
40
+ @media (min-width: ${size.lg}) {
41
+ width: 30%;
42
+ }
43
+ }
44
+ }
45
+
46
+ @media (min-width: ${size.lg}) {
47
+ width: 715px;
48
+ height: 307px;
49
+ min-height: 335px;
50
+ }
51
+
52
+ .content {
53
+ display: flex;
54
+ flex-direction: column;
55
+ height: 100%;
56
+ width: 100%;
57
+ justify-content: flex-start;
58
+
59
+ @media ${device['landscape-tablets']} {
60
+ margin-left: 1rem;
61
+ }
62
+
63
+ @media (min-width: ${size.md}) {
64
+ width: 65%;
65
+ }
66
+ }
67
+
68
+ .title {
69
+ font-family: Inter;
70
+ font-size: 18px;
71
+ font-weight: 700;
72
+ line-height: 24px;
73
+ letter-spacing: -0.3px;
74
+ text-align: left;
75
+ text-decoration-line: underline;
76
+ text-decoration-style: solid;
77
+ text-underline-position: from-font;
78
+ text-decoration-skip-ink: none;
79
+ }
80
+
81
+ .description {
82
+ margin: 1rem 0;
83
+ }
84
+
85
+ .buttons-container {
86
+ display: flex;
87
+ justify-content: space-between;
88
+ align-items: center;
89
+ flex-direction: column;
90
+
91
+ @media ${device.desktop} {
92
+ flex-direction: row;
93
+ align-self: flex-start;
94
+ gap: 1rem;
95
+ align-items: center;
96
+ }
97
+
98
+ .create-doc-button {
99
+ width: 100%;
100
+
101
+ @media ${device.laptop} {
102
+ align-self: flex-start;
103
+ width: auto;
104
+ margin-top: 0.5rem;
105
+ }
106
+
107
+ @media ${device.desktop} {
108
+ width: 100%;
109
+ height: auto;
110
+ }
111
+ }
112
+
113
+ .downloadable-buttons {
114
+ display: flex;
115
+ flex-wrap: wrap;
116
+ gap: 1rem;
117
+ width: 100%;
118
+ justify-content: space-between;
119
+
120
+ a {
121
+ min-width: 46.5%;
122
+ max-width: 46.5%;
123
+ margin-top: 0.75rem;
124
+ }
125
+
126
+ @media ${device.laptop} {
127
+ justify-content: flex-start;
128
+ width: 100%;
129
+
130
+ a {
131
+ min-width: 46.5%;
132
+ max-width: fit-content;
133
+ margin-top: 0.5rem;
134
+ }
135
+ }
136
+
137
+ @media (min-width: ${size.lg}) {
138
+ a {
139
+ min-width: auto;
140
+ max-width: fit-content;
141
+ }
142
+ }
143
+
144
+ @media ${device.desktop} {
145
+ display: flex;
146
+ gap: 1rem;
147
+ flex-wrap: nowrap;
148
+ margin-top: 0;
149
+ }
150
+ }
151
+ }
152
+
153
+ &.download-icon {
154
+ &::before {
155
+ content: '';
156
+ width: 1rem;
157
+ height: 1rem;
158
+ background-image: url('../../../assets/images/svg/icon-save-24-px.svg');
159
+ margin-right: 0.5rem;
160
+ }
161
+ }
162
+ `
@@ -0,0 +1,37 @@
1
+ /* eslint-disable @typescript-eslint/no-unsafe-assignment */
2
+ import React, { type FC } from 'react'
3
+
4
+ import { Button } from '../../atoms'
5
+ import { type SubtypeDocumentCardProps } from './SubtypeDocumentCardProps.types'
6
+ import { SubtypeDocumentCardStyled } from './SubtypeDocumentCard.styled'
7
+
8
+ const SubtypeDocumentCard: FC<SubtypeDocumentCardProps> = ({
9
+ title,
10
+ productUrl,
11
+ description,
12
+ children,
13
+ pdfButton,
14
+ wordButton,
15
+ createDocButton
16
+ }) => {
17
+ return (
18
+ <SubtypeDocumentCardStyled className='subtype-document-card'>
19
+ <div className='image-container'>{children}</div>
20
+ <div className='content'>
21
+ <a href={productUrl}>
22
+ <h1 className='title'>{title}</h1>
23
+ </a>
24
+ <p className='description'>{description}</p>
25
+ <div className='buttons-container'>
26
+ <Button {...createDocButton} />
27
+ <div className='downloadable-buttons'>
28
+ <Button {...pdfButton} />
29
+ <Button {...wordButton} />
30
+ </div>
31
+ </div>
32
+ </div>
33
+ </SubtypeDocumentCardStyled>
34
+ )
35
+ }
36
+
37
+ export default SubtypeDocumentCard
@@ -0,0 +1,10 @@
1
+ import { ButtonProps } from 'src/components/atoms';
2
+ export interface SubtypeDocumentCardProps {
3
+ title: string;
4
+ productUrl: string;
5
+ description: string;
6
+ children: React.ReactNode;
7
+ pdfButton: ButtonProps;
8
+ wordButton: ButtonProps;
9
+ createDocButton: ButtonProps;
10
+ }
@@ -0,0 +1,11 @@
1
+ import { ButtonProps } from 'src/components/atoms'
2
+
3
+ export interface SubtypeDocumentCardProps {
4
+ title: string
5
+ productUrl: string
6
+ description: string
7
+ children: React.ReactNode
8
+ pdfButton: ButtonProps
9
+ wordButton: ButtonProps
10
+ createDocButton: ButtonProps
11
+ }
@@ -0,0 +1,2 @@
1
+ export { default as SubtypeDocumentCard } from './SubtypeDocumentCard';
2
+ export { type SubtypeDocumentCardProps } from './SubtypeDocumentCardProps.types';
@@ -0,0 +1 @@
1
+ export { default as SubtypeDocumentCard } from './SubtypeDocumentCard';
@@ -0,0 +1,2 @@
1
+ export { default as SubtypeDocumentCard } from './SubtypeDocumentCard'
2
+ export { type SubtypeDocumentCardProps } from './SubtypeDocumentCardProps.types'
@@ -1,6 +1,5 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  /* eslint-disable @typescript-eslint/no-explicit-any */
3
- /* eslint-disable @typescript-eslint/no-unsafe-assignment */
4
3
  /* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
5
4
  /* eslint-disable jsx-a11y/click-events-have-key-events */
6
5
  import React, { useState } from 'react';
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
- /* eslint-disable @typescript-eslint/no-unsafe-assignment */
2
+
3
3
  /* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
4
4
  /* eslint-disable jsx-a11y/click-events-have-key-events */
5
5
  import React, { useState } from 'react'
@@ -1,6 +1,4 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /* eslint-disable @typescript-eslint/no-empty-function */
3
- /* eslint-disable @typescript-eslint/no-unsafe-assignment */
4
2
  import { NumericFormat } from 'react-number-format';
5
3
  import React from 'react';
6
4
  import classNames from 'classnames';
@@ -1,5 +1,3 @@
1
- /* eslint-disable @typescript-eslint/no-empty-function */
2
- /* eslint-disable @typescript-eslint/no-unsafe-assignment */
3
1
  import { NumericFormat } from 'react-number-format'
4
2
  import React from 'react'
5
3
  import classNames from 'classnames'
@@ -1,4 +1,3 @@
1
- /* eslint-disable @typescript-eslint/no-unsafe-assignment */
2
1
  import React, { type FC } from 'react'
3
2
 
4
3
  import error from '../../../../images/svg/info-error_24px_outlined.svg'
@@ -1,4 +1,3 @@
1
- /* eslint-disable @typescript-eslint/no-unnecessary-condition */
2
1
  import React, { type FC } from 'react'
3
2
 
4
3
  interface TextInputTooltipProps {
@@ -1,4 +1,3 @@
1
- /* eslint-disable @typescript-eslint/no-unnecessary-condition */
2
1
  import React, { type FC } from 'react'
3
2
 
4
3
  import { Button, RichTextStrapi } from '../../atoms'
@@ -35,6 +35,7 @@ export * from './RatafiaSubscriptionCard';
35
35
  export * from './Snackbar';
36
36
  export * from './StepGetForm';
37
37
  export * from './StepRatafiaCardList';
38
+ export * from './SubtypeDocumentCard';
38
39
  export * from './TagsRatafiaList';
39
40
  export * from './TextInput';
40
41
  export * from './TooltipMenu';
@@ -35,6 +35,7 @@ export * from './RatafiaSubscriptionCard';
35
35
  export * from './Snackbar';
36
36
  export * from './StepGetForm';
37
37
  export * from './StepRatafiaCardList';
38
+ export * from './SubtypeDocumentCard';
38
39
  export * from './TagsRatafiaList';
39
40
  export * from './TextInput';
40
41
  export * from './TooltipMenu';
@@ -35,6 +35,7 @@ export * from './RatafiaSubscriptionCard'
35
35
  export * from './Snackbar'
36
36
  export * from './StepGetForm'
37
37
  export * from './StepRatafiaCardList'
38
+ export * from './SubtypeDocumentCard'
38
39
  export * from './TagsRatafiaList'
39
40
  export * from './TextInput'
40
41
  export * from './TooltipMenu'
@@ -1,5 +1,4 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- /* eslint-disable @typescript-eslint/no-unnecessary-condition */
3
2
  /* eslint-disable @typescript-eslint/no-non-null-assertion */
4
3
  /* eslint-disable @typescript-eslint/strict-boolean-expressions */
5
4
  import React from 'react';
@@ -1,4 +1,3 @@
1
- /* eslint-disable @typescript-eslint/no-unnecessary-condition */
2
1
  /* eslint-disable @typescript-eslint/no-non-null-assertion */
3
2
  /* eslint-disable @typescript-eslint/strict-boolean-expressions */
4
3
  import React from 'react'
@@ -1,5 +1,4 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- /* eslint-disable @typescript-eslint/no-unnecessary-condition */
3
2
  import { useState } from 'react';
4
3
  import { AccordionItem } from '../../molecules';
5
4
  import { AccordionProvider } from './Accordion.context';
@@ -1,4 +1,3 @@
1
- /* eslint-disable @typescript-eslint/no-unnecessary-condition */
2
1
  import React, { useState } from 'react'
3
2
  import { AccordionItem } from '../../molecules'
4
3
  import { type AccordionProps } from './AccordionProps.types'
@@ -1,4 +1,3 @@
1
- /* eslint-disable @typescript-eslint/no-unnecessary-condition */
2
1
  import React, { type FC } from 'react'
3
2
 
4
3
  import { Article, type ArticleProps } from '../../molecules'
@@ -1,4 +1,3 @@
1
- /* eslint-disable @typescript-eslint/no-unsafe-member-access */
2
1
  import React, { type FC } from 'react'
3
2
 
4
3
  import { RichTextInner, RichTextStrapi } from '../../atoms'
@@ -1,4 +1,3 @@
1
- /* eslint-disable @typescript-eslint/no-unsafe-member-access */
2
1
  import React, { type FC } from 'react'
3
2
 
4
3
  import { Button, SidemenuTab } from '../../atoms'
@@ -1,4 +1,3 @@
1
- /* eslint-disable @typescript-eslint/no-unnecessary-condition */
2
1
  import React from 'react'
3
2
 
4
3
  import {
@@ -1,4 +1,3 @@
1
- /* eslint-disable @typescript-eslint/no-unnecessary-condition */
2
1
  import React, { type FC } from 'react'
3
2
 
4
3
  import { AboutUsContent } from '../../organisms/AboutUsContent'
@@ -1,3 +1,4 @@
1
+ /* eslint-disable jsx-a11y/no-noninteractive-element-to-interactive-role */
1
2
  import React from 'react'
2
3
 
3
4
  import { type AsideMenuSectionProps } from './AsideMenuSectionProps'
@@ -1,4 +1,3 @@
1
- /* eslint-disable @typescript-eslint/no-unnecessary-condition */
2
1
  import React, { type FC } from 'react'
3
2
 
4
3
  import { Button, RichTextStrapi } from '../../atoms'
@@ -1,4 +1,3 @@
1
- /* eslint-disable @typescript-eslint/restrict-template-expressions */
2
1
  import React from 'react'
3
2
 
4
3
  import { type HowGetYourFormsSectionProps } from './HowGetYourFormsSectionProps.types'
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable @typescript-eslint/strict-boolean-expressions */
2
- /* eslint-disable @typescript-eslint/no-unnecessary-condition */
2
+
3
3
  import React, { type FC } from 'react'
4
4
 
5
5
  import { type PeopleSayAboutUsSectionProps } from './PeopleSayAboutUsSectionProps.types'
@@ -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
- 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 }))] }));
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
- {!userActive && (
22
+ {!isUserActive && (
17
23
  <Button
18
24
  givenClass='whyLawDistrictSection__button'
19
25
  label={link.cta}