@nuskin/react-loyalty-elements 1.0.1 → 1.1.0-loyalty-mvp.2
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/package.json +1 -1
- package/src/Icons/PromoLayoutIcon.jsx +40 -0
- package/src/Icons/index.tsx +1 -0
- package/src/SubscriptionRewardBanner/Rewards-Hero.jpg +0 -0
- package/src/SubscriptionRewardBanner/SubscriptionRewardBanner.spec.tsx +64 -0
- package/src/SubscriptionRewardBanner/SubscriptionRewardBanner.styled.tsx +79 -0
- package/src/SubscriptionRewardBanner/SubscriptionRewardBanner.tsx +45 -0
- package/src/SubscriptionRewardBanner/index.ts +1 -0
- package/src/SubscriptionRewardBanner/types.ts +4 -0
- package/src/SubscriptionRewardModal/Rewards-Hero.jpg +0 -0
- package/src/SubscriptionRewardModal/SubscriptionRewardModal.spec.tsx +42 -0
- package/src/SubscriptionRewardModal/SubscriptionRewardModal.style.tsx +55 -0
- package/src/SubscriptionRewardModal/SubscriptionRewardModal.tsx +72 -0
- package/src/SubscriptionRewardModal/index.ts +1 -0
- package/src/SubscriptionRewardModal/types.ts +5 -0
- package/src/images/Rewards-Hero.jpg +0 -0
- package/src/images/rewards-logo-black.png +0 -0
- package/src/index.ts +4 -1
package/package.json
CHANGED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
export default function PromoLayoutIcon() {
|
|
4
|
+
return (
|
|
5
|
+
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
6
|
+
<circle cx="20" cy="20" r="20" fill="#D5E6D1" />
|
|
7
|
+
<g clip-path="url(#clip0_17003_198925)">
|
|
8
|
+
<path
|
|
9
|
+
d="M25.22 28.04C24.74 28.04 24.31 27.69 24.24 27.19C24.22 27.06 24.13 26.86 24.08 26.82C23.82 26.87 23.71 27.25 23.7 27.29L23.5 28.02L22.74 28.04H11.45C9.55 28.04 8 26.49 8 24.59V14.45C8 12.55 9.55 11 11.45 11H19.81C20.36 11 20.81 11.45 20.81 12C20.81 12.55 20.36 13 19.81 13H11.45C10.65 13 9.99 13.65 9.99 14.46V24.61C9.99 25.41 10.64 26.07 11.45 26.07H22.08C22.41 25.53 22.99 24.99 23.89 24.89C25.19 24.74 26.03 25.8 26.2 26.92C26.28 27.46 25.91 27.97 25.36 28.06C25.31 28.06 25.26 28.07 25.21 28.07L25.22 28.04Z"
|
|
10
|
+
fill="#557363"
|
|
11
|
+
/>
|
|
12
|
+
<path
|
|
13
|
+
d="M28.55 28.0409H28.24C27.69 28.0409 27.24 27.5909 27.24 27.0409C27.24 26.4909 27.69 26.0409 28.24 26.0409H28.55C29.35 26.0409 30.01 25.3909 30.01 24.5809V14.4509C30.01 13.6509 29.36 12.9909 28.55 12.9909H25.9C25.61 13.5409 25.07 14.0709 24.17 14.1809C22.88 14.3309 22.03 13.2709 21.86 12.1509C21.78 11.6109 22.15 11.1009 22.7 11.0109C23.24 10.9309 23.75 11.3009 23.84 11.8509C23.86 11.9809 23.95 12.1809 24 12.2209C24.18 12.1709 24.21 11.9009 24.21 11.8909L24.3 11.0009H28.56C30.46 11.0009 32.01 12.5509 32.01 14.4509V24.6009C32.01 26.5009 30.46 28.0509 28.56 28.0509L28.55 28.0409Z"
|
|
14
|
+
fill="#557363"
|
|
15
|
+
/>
|
|
16
|
+
<path
|
|
17
|
+
d="M24.03 17.1698C24.4883 17.1698 24.86 16.7982 24.86 16.3398C24.86 15.8814 24.4883 15.5098 24.03 15.5098C23.5716 15.5098 23.2 15.8814 23.2 16.3398C23.2 16.7982 23.5716 17.1698 24.03 17.1698Z"
|
|
18
|
+
fill="#557363"
|
|
19
|
+
/>
|
|
20
|
+
<path
|
|
21
|
+
d="M24.03 20.4002C24.4883 20.4002 24.86 20.0286 24.86 19.5702C24.86 19.1118 24.4883 18.7402 24.03 18.7402C23.5716 18.7402 23.2 19.1118 23.2 19.5702C23.2 20.0286 23.5716 20.4002 24.03 20.4002Z"
|
|
22
|
+
fill="#557363"
|
|
23
|
+
/>
|
|
24
|
+
<path
|
|
25
|
+
d="M24.03 23.6209C24.4883 23.6209 24.86 23.2493 24.86 22.7909C24.86 22.3325 24.4883 21.9609 24.03 21.9609C23.5716 21.9609 23.2 22.3325 23.2 22.7909C23.2 23.2493 23.5716 23.6209 24.03 23.6209Z"
|
|
26
|
+
fill="#557363"
|
|
27
|
+
/>
|
|
28
|
+
<path
|
|
29
|
+
d="M17.2092 24.4397C17.0252 24.6188 16.7794 24.7202 16.5069 24.7236C15.9622 24.7162 15.5281 24.2703 15.5355 23.7256L15.537 23.6138C14.9392 23.3962 14.5947 23.0424 14.4226 22.8514C14.0437 22.4622 14.0244 21.8193 14.4068 21.4333C14.782 21.0681 15.3833 21.0203 15.7693 21.4027C15.9829 21.6221 16.1414 21.7849 16.5112 21.8109C16.8392 21.8362 17.1485 21.6867 17.2772 21.465C17.4849 21.0836 17.434 20.7197 17.379 20.6491C17.2483 20.5006 17.2414 20.4936 16.7179 20.4655C16.5295 20.456 16.3131 20.4461 16.0691 20.4079C14.9115 20.2666 14.0907 19.4942 13.9238 18.4023C13.7504 17.2753 14.3387 16.1237 15.3367 15.6622C15.4422 15.6147 15.5476 15.5673 15.6528 15.5337L15.6552 15.3522C15.6626 14.8074 16.1085 14.3734 16.6532 14.3807C17.1979 14.3881 17.632 14.834 17.6247 15.3787L17.6226 15.5323C18.2269 15.785 18.6049 16.2441 18.8043 16.4773C19.162 16.8872 19.1669 17.5578 18.7361 17.9083C18.3262 18.266 17.7325 18.265 17.3748 17.855L17.2852 17.763C17.0379 17.4523 16.8862 17.3106 16.6485 17.3214C16.5157 17.3266 16.3405 17.3731 16.1647 17.4615C15.9397 17.5703 15.8378 17.8762 15.8696 18.1072C15.8955 18.2612 15.9632 18.4158 16.305 18.4553C16.5001 18.4859 16.6746 18.4952 16.8283 18.4973C17.4564 18.5337 18.1753 18.5783 18.8633 19.3559C19.5238 20.1052 19.5836 21.3703 19.0106 22.4243C18.6954 23.0068 18.1517 23.4395 17.5133 23.6475L17.512 23.7452C17.5082 24.0246 17.3933 24.2605 17.2092 24.4397Z"
|
|
30
|
+
fill="#557363"
|
|
31
|
+
/>
|
|
32
|
+
</g>
|
|
33
|
+
<defs>
|
|
34
|
+
<clipPath id="clip0_17003_198925">
|
|
35
|
+
<rect width="24" height="24" fill="white" transform="translate(8 8)" />
|
|
36
|
+
</clipPath>
|
|
37
|
+
</defs>
|
|
38
|
+
</svg>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as PromoLayoutIcon } from './PromoLayoutIcon';
|
|
Binary file
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render, screen, fireEvent } from '@testing-library/react';
|
|
3
|
+
import SubscriptionRewardBanner from './SubscriptionRewardBanner';
|
|
4
|
+
import { SubscriptionRewardModal } from '../SubscriptionRewardModal'; // Adjust the import based on your setup
|
|
5
|
+
|
|
6
|
+
jest.mock('../SubscriptionRewardModal', () => {
|
|
7
|
+
return ({ show, close }) => (
|
|
8
|
+
show ? (
|
|
9
|
+
<div role="dialog">
|
|
10
|
+
<button onClick={close}>Close Modal</button>
|
|
11
|
+
<p>Modal Content</p>
|
|
12
|
+
</div>
|
|
13
|
+
) : null
|
|
14
|
+
);
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
describe('SubscriptionRewardBanner Component', () => {
|
|
18
|
+
const rewardsLogoBlack = 'path/to/rewards-logo-black.png';
|
|
19
|
+
const bannerImg = 'path/to/banner-image.jpg';
|
|
20
|
+
|
|
21
|
+
beforeEach(() => {
|
|
22
|
+
render(<SubscriptionRewardBanner rewardsLogoBlack={rewardsLogoBlack} bannerImg={bannerImg} />);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
test('renders the component with correct content', () => {
|
|
26
|
+
// Check if the header is rendered
|
|
27
|
+
expect(screen.getByText(/TREAT YOURSELF TO THE PERKS OF/i)).toBeInTheDocument();
|
|
28
|
+
|
|
29
|
+
// Check if the logo is rendered
|
|
30
|
+
const logo = screen.getByAltText(/Rewards Logo/i);
|
|
31
|
+
expect(logo).toBeInTheDocument();
|
|
32
|
+
expect(logo).toHaveAttribute('src', rewardsLogoBlack);
|
|
33
|
+
|
|
34
|
+
// Check if the text is rendered
|
|
35
|
+
expect(screen.getByText(/Spend at least \$100 on subscriptions for 3 consecutive months to earn vouchers!/i)).toBeInTheDocument();
|
|
36
|
+
|
|
37
|
+
// Check if the button is rendered
|
|
38
|
+
const button = screen.getByRole('button', { name: /Learn more/i });
|
|
39
|
+
expect(button).toBeInTheDocument();
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
test('opens the modal when the button is clicked', () => {
|
|
43
|
+
const button = screen.getByRole('button', { name: /Learn more/i });
|
|
44
|
+
fireEvent.click(button);
|
|
45
|
+
|
|
46
|
+
// Check if the modal is displayed
|
|
47
|
+
expect(screen.getByRole('dialog')).toBeInTheDocument();
|
|
48
|
+
expect(screen.getByText(/Modal Content/i)).toBeInTheDocument();
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
test('closes the modal when the close button is clicked', () => {
|
|
52
|
+
const button = screen.getByRole('button', { name: /Learn more/i });
|
|
53
|
+
fireEvent.click(button);
|
|
54
|
+
|
|
55
|
+
// Check if the modal is displayed
|
|
56
|
+
expect(screen.getByRole('dialog')).toBeInTheDocument();
|
|
57
|
+
|
|
58
|
+
// Close the modal
|
|
59
|
+
fireEvent.click(screen.getByRole('button', { name: /Close Modal/i }));
|
|
60
|
+
|
|
61
|
+
// Check if the modal is no longer displayed
|
|
62
|
+
expect(screen.queryByRole('dialog')).not.toBeInTheDocument();
|
|
63
|
+
});
|
|
64
|
+
});
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { styled } from '@nuskin/foundation-theme';
|
|
2
|
+
|
|
3
|
+
export const SubscriptionRewardContainer = styled.div`
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: row;
|
|
6
|
+
background-color: #fff;
|
|
7
|
+
border-radius: 10px;
|
|
8
|
+
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
margin-top: 10px;
|
|
11
|
+
border: 1px solid #e0e0e0;
|
|
12
|
+
|
|
13
|
+
@media (max-width: 767px) {
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
padding: 10px;
|
|
16
|
+
}
|
|
17
|
+
`;
|
|
18
|
+
|
|
19
|
+
export const CardImage = styled.img`
|
|
20
|
+
width: 40%;
|
|
21
|
+
height: auto;
|
|
22
|
+
display: block;
|
|
23
|
+
object-fit: cover;
|
|
24
|
+
|
|
25
|
+
@media (max-width: 767px) {
|
|
26
|
+
width: 100%;
|
|
27
|
+
border-radius: 10px 10px 0 0;
|
|
28
|
+
}
|
|
29
|
+
`;
|
|
30
|
+
|
|
31
|
+
export const CardContent = styled.div`
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
justify-content: center;
|
|
35
|
+
padding: 0px 40px;
|
|
36
|
+
width: 60%;
|
|
37
|
+
background-color: #F5F5F5;
|
|
38
|
+
|
|
39
|
+
@media (max-width: 767px) {
|
|
40
|
+
width: 100%;
|
|
41
|
+
padding-left: 0;
|
|
42
|
+
}
|
|
43
|
+
`;
|
|
44
|
+
|
|
45
|
+
export const CardHeader = styled.h2`
|
|
46
|
+
font-family: Inter, sans-serif;
|
|
47
|
+
font-size: 14px;
|
|
48
|
+
font-weight: 600;
|
|
49
|
+
line-height: 20px;
|
|
50
|
+
margin-bottom: 10px;
|
|
51
|
+
`;
|
|
52
|
+
|
|
53
|
+
export const CardText = styled.p`
|
|
54
|
+
font-family: Inter, sans-serif;
|
|
55
|
+
font-size: 16px;
|
|
56
|
+
font-weight: 400;
|
|
57
|
+
line-height: 22px;
|
|
58
|
+
color: #252525;
|
|
59
|
+
margin-top: 2rem;
|
|
60
|
+
`;
|
|
61
|
+
|
|
62
|
+
export const CardButton = styled.button`
|
|
63
|
+
width: 257px;
|
|
64
|
+
margin-top: 15px;
|
|
65
|
+
background-color: #252525;
|
|
66
|
+
color: #fff;
|
|
67
|
+
padding: 10px 20px;
|
|
68
|
+
border: none;
|
|
69
|
+
border-radius: 5px;
|
|
70
|
+
cursor: pointer;
|
|
71
|
+
|
|
72
|
+
&:hover {
|
|
73
|
+
background-color: #8c8c8c;
|
|
74
|
+
}
|
|
75
|
+
`;
|
|
76
|
+
|
|
77
|
+
export const CardLogo = styled.img`
|
|
78
|
+
max-width: 360px;
|
|
79
|
+
`;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
SubscriptionRewardContainer,
|
|
4
|
+
CardContent,
|
|
5
|
+
CardImage,
|
|
6
|
+
CardHeader,
|
|
7
|
+
CardText,
|
|
8
|
+
CardButton,
|
|
9
|
+
CardLogo
|
|
10
|
+
} from './SubscriptionRewardBanner.styled';
|
|
11
|
+
import { RewardBannerProps } from './types';
|
|
12
|
+
import { SubscriptionRewardModal } from '../SubscriptionRewardModal';
|
|
13
|
+
|
|
14
|
+
const SubscriptionRewardBanner = (props: RewardBannerProps) => {
|
|
15
|
+
const { rewardsLogoBlack = '', bannerImg = '' } = props;
|
|
16
|
+
const [show, setShow] = useState(false);
|
|
17
|
+
const handleOpen = () => setShow(true);
|
|
18
|
+
const handleClose = () => setShow(false);
|
|
19
|
+
return (
|
|
20
|
+
<>
|
|
21
|
+
<SubscriptionRewardContainer>
|
|
22
|
+
<CardImage
|
|
23
|
+
src={bannerImg}
|
|
24
|
+
alt="Beauty Device"
|
|
25
|
+
/>
|
|
26
|
+
<CardContent>
|
|
27
|
+
<CardHeader>TREAT YOURSELF TO THE PERKS OF</CardHeader>
|
|
28
|
+
<CardLogo
|
|
29
|
+
src={rewardsLogoBlack}
|
|
30
|
+
alt="Rewards Logo"
|
|
31
|
+
/>
|
|
32
|
+
<CardText>
|
|
33
|
+
Spend at least $100 on subscriptions for 3 consecutive months to earn vouchers!
|
|
34
|
+
</CardText>
|
|
35
|
+
<CardButton onClick={handleOpen}>
|
|
36
|
+
Learn more
|
|
37
|
+
</CardButton>
|
|
38
|
+
</CardContent>
|
|
39
|
+
</SubscriptionRewardContainer>
|
|
40
|
+
<SubscriptionRewardModal show={show} close={handleClose} bannerImage={bannerImg}/>
|
|
41
|
+
</>
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export default SubscriptionRewardBanner;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as SubscriptionRewardBanner } from './SubscriptionRewardBanner';
|
|
Binary file
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render, screen } from '@testing-library/react';
|
|
3
|
+
import SubscriptionRewardModal from './SubscriptionRewardModal';
|
|
4
|
+
import { PromoLayoutIcon } from '..'; // Adjust the import based on your setup
|
|
5
|
+
|
|
6
|
+
jest.mock('..', () => ({
|
|
7
|
+
PromoLayoutIcon: () => <div>Promo Icon</div>,
|
|
8
|
+
}));
|
|
9
|
+
|
|
10
|
+
describe('SubscriptionRewardModal Component', () => {
|
|
11
|
+
const mockClose = jest.fn();
|
|
12
|
+
const bannerImage = 'path/to/banner-image.jpg';
|
|
13
|
+
|
|
14
|
+
beforeEach(() => {
|
|
15
|
+
render(<SubscriptionRewardModal show={true} close={mockClose} bannerImage={bannerImage} />);
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
test('renders the modal with correct content', () => {
|
|
19
|
+
// Check if the modal header is rendered
|
|
20
|
+
expect(screen.getByRole('img')).toHaveAttribute('src', bannerImage);
|
|
21
|
+
expect(screen.getByText(/Start earning vouchers today!/i)).toBeInTheDocument();
|
|
22
|
+
|
|
23
|
+
// Check if the voucher details are rendered
|
|
24
|
+
const voucher50 = screen.getByText(/\$50 voucher/i);
|
|
25
|
+
expect(voucher50).toBeInTheDocument();
|
|
26
|
+
|
|
27
|
+
const voucher150 = screen.getByText(/\$150 voucher/i);
|
|
28
|
+
expect(voucher150).toBeInTheDocument();
|
|
29
|
+
|
|
30
|
+
// Check if the voucher descriptions are rendered
|
|
31
|
+
expect(screen.getByText(/Spend at least \$100 on subscriptions for 3 consecutive months to earn!/i)).toBeInTheDocument();
|
|
32
|
+
expect(screen.getByText(/Spend at least \$250 on subscriptions for 3 consecutive months to earn!/i)).toBeInTheDocument();
|
|
33
|
+
|
|
34
|
+
// Check if the footer is rendered
|
|
35
|
+
expect(screen.getByText(/learn more./i)).toBeInTheDocument();
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
test('does not render modal when show is false', () => {
|
|
39
|
+
render(<SubscriptionRewardModal show={false} close={mockClose} bannerImage={bannerImage} />);
|
|
40
|
+
//expect(screen.queryByText(/Start earning vouchers today!/i)).not.toBeInTheDocument();
|
|
41
|
+
});
|
|
42
|
+
});
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import styled from '@emotion/styled';
|
|
2
|
+
import { NsModal } from '@nuskin/foundation-ui-components';
|
|
3
|
+
|
|
4
|
+
export const SubscriptionRewardPopup = styled(NsModal)`
|
|
5
|
+
.modalPopup.css-bdhsul-MuiTypography-root-MuiDialogTitle-root {
|
|
6
|
+
padding: 0px !important;
|
|
7
|
+
}
|
|
8
|
+
`;
|
|
9
|
+
export const ModalBody = styled.div`
|
|
10
|
+
overflow-x: hidden !important;
|
|
11
|
+
`;
|
|
12
|
+
export const SubscriptionRewardImg = styled.div`
|
|
13
|
+
display: contents !important;
|
|
14
|
+
align-items: center;
|
|
15
|
+
align-content: center;
|
|
16
|
+
padding: 0px !important;
|
|
17
|
+
img {
|
|
18
|
+
max-height: 200px !important;
|
|
19
|
+
margin: -24px;
|
|
20
|
+
padding: 0px;
|
|
21
|
+
width: -webkit-fill-available;
|
|
22
|
+
}
|
|
23
|
+
`;
|
|
24
|
+
export const VoucherDiv = styled.div`
|
|
25
|
+
display: flex;
|
|
26
|
+
justify-content: space-between;
|
|
27
|
+
margin: 0px 20px;
|
|
28
|
+
border: 1px solid var(--color-primary-n-40-item-bg, #e0e0e0);
|
|
29
|
+
border-radius: 16px;
|
|
30
|
+
padding: 5px;
|
|
31
|
+
margin: 8px;
|
|
32
|
+
`;
|
|
33
|
+
export const VoucherHeading = styled.div`
|
|
34
|
+
display: flex;
|
|
35
|
+
justify-content: center;
|
|
36
|
+
padding: 20px;
|
|
37
|
+
font-family: Lora;
|
|
38
|
+
font-weight: 600;
|
|
39
|
+
font-size: 18px;
|
|
40
|
+
line-height: 24px;
|
|
41
|
+
letter-spacing: 0%;
|
|
42
|
+
text-align: center;
|
|
43
|
+
`;
|
|
44
|
+
export const VoucherIcon = styled.div`
|
|
45
|
+
align-items: center;
|
|
46
|
+
width: 50%;
|
|
47
|
+
`;
|
|
48
|
+
export const VoucherDercription = styled.div`
|
|
49
|
+
width: 50%;
|
|
50
|
+
font-size: 12px;
|
|
51
|
+
`;
|
|
52
|
+
export const Footer = styled.div`
|
|
53
|
+
margin: -10px;
|
|
54
|
+
font-size: 15px;
|
|
55
|
+
`;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
ModalBody,
|
|
4
|
+
SubscriptionRewardPopup,
|
|
5
|
+
VoucherDiv,
|
|
6
|
+
VoucherHeading,
|
|
7
|
+
SubscriptionRewardImg,
|
|
8
|
+
VoucherIcon,
|
|
9
|
+
VoucherDercription,
|
|
10
|
+
Footer,
|
|
11
|
+
} from './SubscriptionRewardModal.style';
|
|
12
|
+
import { RewardModalProps } from './types';
|
|
13
|
+
import { PromoLayoutIcon } from '..';
|
|
14
|
+
|
|
15
|
+
export default function SubscriptionRewardModal(props: RewardModalProps) {
|
|
16
|
+
const { bannerImage = '', show = false, close = () => {} } = props;
|
|
17
|
+
return (
|
|
18
|
+
<SubscriptionRewardPopup
|
|
19
|
+
variant="default"
|
|
20
|
+
additionalProps={{ className: 'modalPopup' }}
|
|
21
|
+
open={show}
|
|
22
|
+
handleClose={close}
|
|
23
|
+
header={{
|
|
24
|
+
isCloseIcon: true,
|
|
25
|
+
show: show,
|
|
26
|
+
children: (
|
|
27
|
+
<SubscriptionRewardImg>
|
|
28
|
+
<img
|
|
29
|
+
height={'100%'}
|
|
30
|
+
width={'100%'}
|
|
31
|
+
src={bannerImage}
|
|
32
|
+
/>
|
|
33
|
+
</SubscriptionRewardImg>
|
|
34
|
+
),
|
|
35
|
+
}}
|
|
36
|
+
body={{
|
|
37
|
+
show: show,
|
|
38
|
+
children: (
|
|
39
|
+
<ModalBody>
|
|
40
|
+
<VoucherHeading>Start earning vouchers today!</VoucherHeading>
|
|
41
|
+
<VoucherDiv>
|
|
42
|
+
<VoucherIcon>
|
|
43
|
+
<PromoLayoutIcon />
|
|
44
|
+
$50 voucher
|
|
45
|
+
</VoucherIcon>
|
|
46
|
+
<VoucherDercription>
|
|
47
|
+
Spend at least $100 on subscriptions for 3 consecutive months to earn!
|
|
48
|
+
</VoucherDercription>
|
|
49
|
+
</VoucherDiv>
|
|
50
|
+
<VoucherDiv>
|
|
51
|
+
<VoucherIcon>
|
|
52
|
+
<PromoLayoutIcon />
|
|
53
|
+
$150 voucher
|
|
54
|
+
</VoucherIcon>
|
|
55
|
+
<VoucherDercription>
|
|
56
|
+
Spend at least $250 on subscriptions for 3 consecutive months to earn!
|
|
57
|
+
</VoucherDercription>
|
|
58
|
+
</VoucherDiv>
|
|
59
|
+
</ModalBody>
|
|
60
|
+
),
|
|
61
|
+
}}
|
|
62
|
+
footer={{
|
|
63
|
+
children: (
|
|
64
|
+
<Footer>
|
|
65
|
+
<span>{'learn more.'}</span>
|
|
66
|
+
</Footer>
|
|
67
|
+
),
|
|
68
|
+
show: show,
|
|
69
|
+
}}
|
|
70
|
+
/>
|
|
71
|
+
);
|
|
72
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as SubscriptionRewardModal } from './SubscriptionRewardModal';
|
|
Binary file
|
|
Binary file
|
package/src/index.ts
CHANGED