@npm_leadtech/legal-lib-components 7.63.5 → 7.63.6
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/atoms/FeatureItem/FeatureItem.d.ts +3 -0
- package/dist/src/components/atoms/FeatureItem/FeatureItem.js +5 -0
- package/dist/src/components/atoms/FeatureItem/FeatureItem.styled.d.ts +1 -0
- package/dist/src/components/atoms/FeatureItem/FeatureItem.styled.js +18 -0
- package/dist/src/components/atoms/FeatureItem/FeatureItem.styled.ts +19 -0
- package/dist/src/components/atoms/FeatureItem/FeatureItem.tsx +12 -0
- package/dist/src/components/atoms/FeatureItem/FeatureItemProps.d.ts +9 -0
- package/dist/src/components/atoms/FeatureItem/FeatureItemProps.js +1 -0
- package/dist/src/components/atoms/FeatureItem/FeatureItemProps.ts +10 -0
- package/dist/src/components/atoms/FeatureItem/index.d.ts +2 -0
- package/dist/src/components/atoms/FeatureItem/index.js +2 -0
- package/dist/src/components/atoms/FeatureItem/index.ts +2 -0
- package/dist/src/components/atoms/Logo/Logo.js +4 -2
- package/dist/src/components/atoms/Logo/Logo.tsx +4 -2
- package/dist/src/components/atoms/Logo/svg/legalfinity-logo.svg +15 -0
- package/dist/src/components/atoms/Logo/svg/legalfinity-white-logo.svg +15 -0
- package/dist/src/components/atoms/PlanCard/PlanCard.d.ts +3 -0
- package/dist/src/components/atoms/PlanCard/PlanCard.js +6 -0
- package/dist/src/components/atoms/PlanCard/PlanCard.styled.d.ts +8 -0
- package/dist/src/components/atoms/PlanCard/PlanCard.styled.js +75 -0
- package/dist/src/components/atoms/PlanCard/PlanCard.styled.ts +83 -0
- package/dist/src/components/atoms/PlanCard/PlanCard.tsx +42 -0
- package/dist/src/components/atoms/PlanCard/PlanCardProps.d.ts +23 -0
- package/dist/src/components/atoms/PlanCard/PlanCardProps.js +1 -0
- package/dist/src/components/atoms/PlanCard/PlanCardProps.ts +26 -0
- package/dist/src/components/atoms/PlanCard/index.d.ts +2 -0
- package/dist/src/components/atoms/PlanCard/index.js +2 -0
- package/dist/src/components/atoms/PlanCard/index.ts +2 -0
- package/dist/src/components/atoms/index.d.ts +2 -0
- package/dist/src/components/atoms/index.js +2 -0
- package/dist/src/components/atoms/index.ts +2 -0
- package/dist/src/components/molecules/AccordionItem/AccordionItem.styled.js +1 -10
- package/dist/src/components/molecules/AccordionItem/AccordionItem.styled.ts +1 -10
- package/dist/src/components/molecules/BoxForm/BoxForm.styled.js +8 -2
- package/dist/src/components/molecules/BoxForm/BoxForm.styled.ts +8 -2
- package/dist/src/components/organisms/PricingPageHeader/PricingPageHeader.d.ts +3 -0
- package/dist/src/components/organisms/PricingPageHeader/PricingPageHeader.js +7 -0
- package/dist/src/components/organisms/PricingPageHeader/PricingPageHeader.styled.d.ts +3 -0
- package/dist/src/components/organisms/PricingPageHeader/PricingPageHeader.styled.js +34 -0
- package/dist/src/components/organisms/PricingPageHeader/PricingPageHeader.styled.tsx +37 -0
- package/dist/src/components/organisms/PricingPageHeader/PricingPageHeader.tsx +21 -0
- package/dist/src/components/organisms/PricingPageHeader/PricingPageHeaderProps.d.ts +4 -0
- package/dist/src/components/organisms/PricingPageHeader/PricingPageHeaderProps.js +1 -0
- package/dist/src/components/organisms/PricingPageHeader/PricingPageHeaderProps.ts +4 -0
- package/dist/src/components/organisms/PricingPageHeader/index.d.ts +2 -0
- package/dist/src/components/organisms/PricingPageHeader/index.js +2 -0
- package/dist/src/components/organisms/PricingPageHeader/index.ts +2 -0
- package/dist/src/components/organisms/index.d.ts +1 -0
- package/dist/src/components/organisms/index.js +1 -0
- package/dist/src/components/organisms/index.ts +1 -0
- package/dist/src/components/pages/PricingPlansPage/PricingPlansPage.d.ts +3 -0
- package/dist/src/components/pages/PricingPlansPage/PricingPlansPage.js +9 -0
- package/dist/src/components/pages/PricingPlansPage/PricingPlansPage.styled.d.ts +16 -0
- package/dist/src/components/pages/PricingPlansPage/PricingPlansPage.styled.js +87 -0
- package/dist/src/components/pages/PricingPlansPage/PricingPlansPage.styled.ts +106 -0
- package/dist/src/components/pages/PricingPlansPage/PricingPlansPage.tsx +68 -0
- package/dist/src/components/pages/PricingPlansPage/PricingPlansPageProps.d.ts +9 -0
- package/dist/src/components/pages/PricingPlansPage/PricingPlansPageProps.js +1 -0
- package/dist/src/components/pages/PricingPlansPage/PricingPlansPageProps.ts +10 -0
- package/dist/src/components/pages/PricingPlansPage/index.d.ts +2 -0
- package/dist/src/components/pages/PricingPlansPage/index.js +2 -0
- package/dist/src/components/pages/PricingPlansPage/index.ts +2 -0
- package/dist/src/components/pages/index.d.ts +1 -0
- package/dist/src/components/pages/index.js +1 -0
- package/dist/src/components/pages/index.ts +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
export const PricingHeaderStyled = styled.header `
|
|
3
|
+
display: flex;
|
|
4
|
+
justify-content: space-between;
|
|
5
|
+
align-items: center;
|
|
6
|
+
padding: 1rem 1.5rem;
|
|
7
|
+
`;
|
|
8
|
+
export const PhoneButtonStyled = styled.a `
|
|
9
|
+
display: none;
|
|
10
|
+
align-items: center;
|
|
11
|
+
gap: 0.25rem;
|
|
12
|
+
height: 2.5rem;
|
|
13
|
+
border-radius: 0.25rem;
|
|
14
|
+
padding: 0.25rem 0.5rem;
|
|
15
|
+
text-decoration: none;
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
border: 1px solid var(--neutral-neutral-4);
|
|
18
|
+
font-size: 14px;
|
|
19
|
+
color: var(--primary-main);
|
|
20
|
+
@media (max-width: 768px) {
|
|
21
|
+
display: flex;
|
|
22
|
+
}
|
|
23
|
+
`;
|
|
24
|
+
export const PhoneNumberStyled = styled.div `
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
gap: 0.5rem;
|
|
28
|
+
color: var(--neutral-neutral-2);
|
|
29
|
+
height: 2.5rem;
|
|
30
|
+
|
|
31
|
+
@media (max-width: 768px) {
|
|
32
|
+
display: none;
|
|
33
|
+
}
|
|
34
|
+
`;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import styled from 'styled-components'
|
|
2
|
+
|
|
3
|
+
export const PricingHeaderStyled = styled.header`
|
|
4
|
+
display: flex;
|
|
5
|
+
justify-content: space-between;
|
|
6
|
+
align-items: center;
|
|
7
|
+
padding: 1rem 1.5rem;
|
|
8
|
+
`
|
|
9
|
+
|
|
10
|
+
export const PhoneButtonStyled = styled.a`
|
|
11
|
+
display: none;
|
|
12
|
+
align-items: center;
|
|
13
|
+
gap: 0.25rem;
|
|
14
|
+
height: 2.5rem;
|
|
15
|
+
border-radius: 0.25rem;
|
|
16
|
+
padding: 0.25rem 0.5rem;
|
|
17
|
+
text-decoration: none;
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
border: 1px solid var(--neutral-neutral-4);
|
|
20
|
+
font-size: 14px;
|
|
21
|
+
color: var(--primary-main);
|
|
22
|
+
@media (max-width: 768px) {
|
|
23
|
+
display: flex;
|
|
24
|
+
}
|
|
25
|
+
`
|
|
26
|
+
|
|
27
|
+
export const PhoneNumberStyled = styled.div`
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
gap: 0.5rem;
|
|
31
|
+
color: var(--neutral-neutral-2);
|
|
32
|
+
height: 2.5rem;
|
|
33
|
+
|
|
34
|
+
@media (max-width: 768px) {
|
|
35
|
+
display: none;
|
|
36
|
+
}
|
|
37
|
+
`
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { PhoneButtonStyled, PhoneNumberStyled, PricingHeaderStyled } from './PricingPageHeader.styled'
|
|
2
|
+
import { Logo } from '../../atoms'
|
|
3
|
+
import { PhoneIcon } from '../../../../images/componentsSvg/PhoneIcon'
|
|
4
|
+
import { PricingHeaderProps } from './PricingPageHeaderProps'
|
|
5
|
+
import React from 'react'
|
|
6
|
+
|
|
7
|
+
export const PricingPageHeader: React.FC<PricingHeaderProps> = ({ siteName = 'Legalfinity', phoneNumber }) => {
|
|
8
|
+
return (
|
|
9
|
+
<PricingHeaderStyled>
|
|
10
|
+
<Logo siteName={siteName} width='150' height='26' />
|
|
11
|
+
<PhoneNumberStyled>
|
|
12
|
+
<PhoneIcon width={16} height={16} fill='#6d7275' />
|
|
13
|
+
<strong>{phoneNumber}</strong>
|
|
14
|
+
</PhoneNumberStyled>
|
|
15
|
+
<PhoneButtonStyled href={`tel:${phoneNumber}`} target='__self'>
|
|
16
|
+
<PhoneIcon width={24} height={24} fill='currentColor' />
|
|
17
|
+
<strong>{'Call Us'}</strong>
|
|
18
|
+
</PhoneButtonStyled>
|
|
19
|
+
</PricingHeaderStyled>
|
|
20
|
+
)
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { FeatureItem, PlanCard } from '../../atoms';
|
|
3
|
+
import { FeaturesGrid, FeaturesSection, PlanSelector, PlanWrapper, PlansWrapper, PricingContainerStyled, SelectorButton } from './PricingPlansPage.styled';
|
|
4
|
+
import { PricingPageHeader } from '../../organisms';
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export const PricingPlansPage = ({ subscriptionPlans, features, onPlanSelect, headerDivider, siteName = 'Legalfinity', phoneNumber }) => {
|
|
7
|
+
const [activePlanIndex, setActivePlanIndex] = React.useState(0);
|
|
8
|
+
return (_jsxs(_Fragment, { children: [_jsx(PricingPageHeader, { siteName: siteName, phoneNumber: phoneNumber }), headerDivider, subscriptionPlans?.length > 0 && (_jsxs(PricingContainerStyled, { children: [_jsx(PlanSelector, { children: subscriptionPlans.map((plan, index) => (_jsx(SelectorButton, { isActive: index === activePlanIndex, onClick: () => setActivePlanIndex(index), dataQa: `selector-${plan.subscription_type?.name.replaceAll(' ', '')}`, children: plan?.subscription_type?.name }, `selector-${plan?.pricingLabel}`))) }), _jsx(PlansWrapper, { children: subscriptionPlans.map((plan, index) => (_jsx(PlanWrapper, { isHighlighted: plan.highlightPlan, isActive: index === activePlanIndex, className: `pricing-plan__element-container ${plan?.highlightPlan ? 'highlight' : ''} ${index === activePlanIndex ? 'active' : ''}`, children: _jsx(PlanCard, { onSelect: onPlanSelect ?? (() => { }), plan: plan }) }, plan.pricingLabel))) }), features && features.length > 0 && (_jsx(FeaturesSection, { children: _jsx(FeaturesGrid, { children: features.map((feature) => (_jsx(FeatureItem, { feature: feature }, feature.description))) }) }))] }))] }));
|
|
9
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type PlanWrapperProps = {
|
|
2
|
+
isActive: boolean;
|
|
3
|
+
isHighlighted?: boolean;
|
|
4
|
+
};
|
|
5
|
+
type SelectorButton = {
|
|
6
|
+
isActive: boolean;
|
|
7
|
+
dataQa: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const PricingContainerStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
|
|
10
|
+
export declare const PlanSelector: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
11
|
+
export declare const SelectorButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, SelectorButton>> & string;
|
|
12
|
+
export declare const PlansWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
13
|
+
export declare const PlanWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, PlanWrapperProps>> & string;
|
|
14
|
+
export declare const FeaturesSection: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
15
|
+
export declare const FeaturesGrid: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, never>> & string;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
export const PricingContainerStyled = styled.section `
|
|
3
|
+
margin: 0 auto 0 auto;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
align-items: center;
|
|
8
|
+
max-width: 996px;
|
|
9
|
+
gap: 1.5rem;
|
|
10
|
+
margin-bottom: 3rem;
|
|
11
|
+
padding: 0 1.5rem;
|
|
12
|
+
`;
|
|
13
|
+
export const PlanSelector = styled.div `
|
|
14
|
+
display: flex;
|
|
15
|
+
justify-content: center;
|
|
16
|
+
gap: 0.5rem;
|
|
17
|
+
border-radius: 1rem;
|
|
18
|
+
padding: 0.5rem;
|
|
19
|
+
|
|
20
|
+
@media (min-width: 768px) {
|
|
21
|
+
display: none;
|
|
22
|
+
}
|
|
23
|
+
`;
|
|
24
|
+
export const SelectorButton = styled.button `
|
|
25
|
+
padding: 0.5rem;
|
|
26
|
+
border-radius: 0.5rem;
|
|
27
|
+
border: none;
|
|
28
|
+
outline: inherit;
|
|
29
|
+
flex: 1;
|
|
30
|
+
font-size: 12px;
|
|
31
|
+
font-weight: 700;
|
|
32
|
+
background-color: var(--neutral-neutral-4);
|
|
33
|
+
color: var(--neutral-neutral-1);
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
transition: background-color 0.3s;
|
|
36
|
+
|
|
37
|
+
${({ isActive }) => isActive &&
|
|
38
|
+
css `
|
|
39
|
+
background-color: var(--primary-main);
|
|
40
|
+
color: white;
|
|
41
|
+
`}
|
|
42
|
+
`;
|
|
43
|
+
export const PlansWrapper = styled.div `
|
|
44
|
+
display: flex;
|
|
45
|
+
height: 100%;
|
|
46
|
+
gap: 1rem;
|
|
47
|
+
width: 100%;
|
|
48
|
+
max-width: 327px;
|
|
49
|
+
|
|
50
|
+
@media (min-width: 768px) {
|
|
51
|
+
max-width: none;
|
|
52
|
+
gap: 20px;
|
|
53
|
+
}
|
|
54
|
+
`;
|
|
55
|
+
export const PlanWrapper = styled.div `
|
|
56
|
+
max-width: 327px;
|
|
57
|
+
border-radius: 1rem;
|
|
58
|
+
flex: 1;
|
|
59
|
+
display: ${({ isActive }) => (isActive ? 'block' : 'none')};
|
|
60
|
+
background-color: white;
|
|
61
|
+
|
|
62
|
+
${({ isHighlighted }) => isHighlighted &&
|
|
63
|
+
css `
|
|
64
|
+
border: 2px solid var(--primary-main);
|
|
65
|
+
`}
|
|
66
|
+
|
|
67
|
+
@media (min-width: 768px) {
|
|
68
|
+
display: block;
|
|
69
|
+
max-width: none;
|
|
70
|
+
}
|
|
71
|
+
`;
|
|
72
|
+
export const FeaturesSection = styled.div `
|
|
73
|
+
width: 100%;
|
|
74
|
+
`;
|
|
75
|
+
export const FeaturesGrid = styled.ul `
|
|
76
|
+
display: grid;
|
|
77
|
+
grid-template-columns: repeat(2, 1fr);
|
|
78
|
+
gap: 0.5rem;
|
|
79
|
+
list-style: none;
|
|
80
|
+
padding: 0;
|
|
81
|
+
margin: 0;
|
|
82
|
+
|
|
83
|
+
@media (min-width: 768px) {
|
|
84
|
+
display: flex;
|
|
85
|
+
justify-content: center;
|
|
86
|
+
}
|
|
87
|
+
`;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components'
|
|
2
|
+
|
|
3
|
+
type PlanWrapperProps = {
|
|
4
|
+
isActive: boolean
|
|
5
|
+
isHighlighted?: boolean
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
type SelectorButton = {
|
|
9
|
+
isActive: boolean
|
|
10
|
+
dataQa: string
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const PricingContainerStyled = styled.section`
|
|
14
|
+
margin: 0 auto 0 auto;
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
align-items: center;
|
|
19
|
+
max-width: 996px;
|
|
20
|
+
gap: 1.5rem;
|
|
21
|
+
margin-bottom: 3rem;
|
|
22
|
+
padding: 0 1.5rem;
|
|
23
|
+
`
|
|
24
|
+
|
|
25
|
+
export const PlanSelector = styled.div`
|
|
26
|
+
display: flex;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
gap: 0.5rem;
|
|
29
|
+
border-radius: 1rem;
|
|
30
|
+
padding: 0.5rem;
|
|
31
|
+
|
|
32
|
+
@media (min-width: 768px) {
|
|
33
|
+
display: none;
|
|
34
|
+
}
|
|
35
|
+
`
|
|
36
|
+
|
|
37
|
+
export const SelectorButton = styled.button<SelectorButton>`
|
|
38
|
+
padding: 0.5rem;
|
|
39
|
+
border-radius: 0.5rem;
|
|
40
|
+
border: none;
|
|
41
|
+
outline: inherit;
|
|
42
|
+
flex: 1;
|
|
43
|
+
font-size: 12px;
|
|
44
|
+
font-weight: 700;
|
|
45
|
+
background-color: var(--neutral-neutral-4);
|
|
46
|
+
color: var(--neutral-neutral-1);
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
transition: background-color 0.3s;
|
|
49
|
+
|
|
50
|
+
${({ isActive }) =>
|
|
51
|
+
isActive &&
|
|
52
|
+
css`
|
|
53
|
+
background-color: var(--primary-main);
|
|
54
|
+
color: white;
|
|
55
|
+
`}
|
|
56
|
+
`
|
|
57
|
+
|
|
58
|
+
export const PlansWrapper = styled.div`
|
|
59
|
+
display: flex;
|
|
60
|
+
height: 100%;
|
|
61
|
+
gap: 1rem;
|
|
62
|
+
width: 100%;
|
|
63
|
+
max-width: 327px;
|
|
64
|
+
|
|
65
|
+
@media (min-width: 768px) {
|
|
66
|
+
max-width: none;
|
|
67
|
+
gap: 20px;
|
|
68
|
+
}
|
|
69
|
+
`
|
|
70
|
+
|
|
71
|
+
export const PlanWrapper = styled.div<PlanWrapperProps>`
|
|
72
|
+
max-width: 327px;
|
|
73
|
+
border-radius: 1rem;
|
|
74
|
+
flex: 1;
|
|
75
|
+
display: ${({ isActive }) => (isActive ? 'block' : 'none')};
|
|
76
|
+
background-color: white;
|
|
77
|
+
|
|
78
|
+
${({ isHighlighted }) =>
|
|
79
|
+
isHighlighted &&
|
|
80
|
+
css`
|
|
81
|
+
border: 2px solid var(--primary-main);
|
|
82
|
+
`}
|
|
83
|
+
|
|
84
|
+
@media (min-width: 768px) {
|
|
85
|
+
display: block;
|
|
86
|
+
max-width: none;
|
|
87
|
+
}
|
|
88
|
+
`
|
|
89
|
+
|
|
90
|
+
export const FeaturesSection = styled.div`
|
|
91
|
+
width: 100%;
|
|
92
|
+
`
|
|
93
|
+
|
|
94
|
+
export const FeaturesGrid = styled.ul`
|
|
95
|
+
display: grid;
|
|
96
|
+
grid-template-columns: repeat(2, 1fr);
|
|
97
|
+
gap: 0.5rem;
|
|
98
|
+
list-style: none;
|
|
99
|
+
padding: 0;
|
|
100
|
+
margin: 0;
|
|
101
|
+
|
|
102
|
+
@media (min-width: 768px) {
|
|
103
|
+
display: flex;
|
|
104
|
+
justify-content: center;
|
|
105
|
+
}
|
|
106
|
+
`
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { FeatureItem, PlanCard } from '../../atoms'
|
|
2
|
+
import {
|
|
3
|
+
FeaturesGrid,
|
|
4
|
+
FeaturesSection,
|
|
5
|
+
PlanSelector,
|
|
6
|
+
PlanWrapper,
|
|
7
|
+
PlansWrapper,
|
|
8
|
+
PricingContainerStyled,
|
|
9
|
+
SelectorButton
|
|
10
|
+
} from './PricingPlansPage.styled'
|
|
11
|
+
import { PricingPageHeader } from '../../organisms'
|
|
12
|
+
import { PricingPlansPageProps } from './PricingPlansPageProps'
|
|
13
|
+
import React from 'react'
|
|
14
|
+
|
|
15
|
+
export const PricingPlansPage: React.FC<PricingPlansPageProps> = ({
|
|
16
|
+
subscriptionPlans,
|
|
17
|
+
features,
|
|
18
|
+
onPlanSelect,
|
|
19
|
+
headerDivider,
|
|
20
|
+
siteName = 'Legalfinity',
|
|
21
|
+
phoneNumber
|
|
22
|
+
}) => {
|
|
23
|
+
const [activePlanIndex, setActivePlanIndex] = React.useState(0)
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<>
|
|
27
|
+
<PricingPageHeader siteName={siteName} phoneNumber={phoneNumber} />
|
|
28
|
+
{headerDivider}
|
|
29
|
+
{subscriptionPlans?.length > 0 && (
|
|
30
|
+
<PricingContainerStyled>
|
|
31
|
+
<PlanSelector>
|
|
32
|
+
{subscriptionPlans.map((plan, index) => (
|
|
33
|
+
<SelectorButton
|
|
34
|
+
key={`selector-${plan?.pricingLabel}`}
|
|
35
|
+
isActive={index === activePlanIndex}
|
|
36
|
+
onClick={() => setActivePlanIndex(index)}
|
|
37
|
+
dataQa={`selector-${plan.subscription_type?.name.replaceAll(' ', '')}`}
|
|
38
|
+
>
|
|
39
|
+
{plan?.subscription_type?.name}
|
|
40
|
+
</SelectorButton>
|
|
41
|
+
))}
|
|
42
|
+
</PlanSelector>
|
|
43
|
+
<PlansWrapper>
|
|
44
|
+
{subscriptionPlans.map((plan, index) => (
|
|
45
|
+
<PlanWrapper
|
|
46
|
+
key={plan.pricingLabel}
|
|
47
|
+
isHighlighted={plan.highlightPlan}
|
|
48
|
+
isActive={index === activePlanIndex}
|
|
49
|
+
className={`pricing-plan__element-container ${plan?.highlightPlan ? 'highlight' : ''} ${index === activePlanIndex ? 'active' : ''}`}
|
|
50
|
+
>
|
|
51
|
+
<PlanCard onSelect={onPlanSelect ?? (() => {})} plan={plan} />
|
|
52
|
+
</PlanWrapper>
|
|
53
|
+
))}
|
|
54
|
+
</PlansWrapper>
|
|
55
|
+
{features && features.length > 0 && (
|
|
56
|
+
<FeaturesSection>
|
|
57
|
+
<FeaturesGrid>
|
|
58
|
+
{features.map((feature) => (
|
|
59
|
+
<FeatureItem feature={feature} key={feature.description} />
|
|
60
|
+
))}
|
|
61
|
+
</FeaturesGrid>
|
|
62
|
+
</FeaturesSection>
|
|
63
|
+
)}
|
|
64
|
+
</PricingContainerStyled>
|
|
65
|
+
)}
|
|
66
|
+
</>
|
|
67
|
+
)
|
|
68
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FeatureItemProp, SubscriptionPlan } from '../../atoms';
|
|
2
|
+
export interface PricingPlansPageProps {
|
|
3
|
+
subscriptionPlans: SubscriptionPlan[];
|
|
4
|
+
features?: FeatureItemProp[];
|
|
5
|
+
onPlanSelect?: (sku: string) => void;
|
|
6
|
+
headerDivider?: React.ReactNode;
|
|
7
|
+
siteName?: string;
|
|
8
|
+
phoneNumber?: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FeatureItemProp, SubscriptionPlan } from '../../atoms'
|
|
2
|
+
|
|
3
|
+
export interface PricingPlansPageProps {
|
|
4
|
+
subscriptionPlans: SubscriptionPlan[]
|
|
5
|
+
features?: FeatureItemProp[]
|
|
6
|
+
onPlanSelect?: (sku: string) => void
|
|
7
|
+
headerDivider?: React.ReactNode
|
|
8
|
+
siteName?: string
|
|
9
|
+
phoneNumber?: string
|
|
10
|
+
}
|