@stigg/react-sdk 4.8.0 → 4.8.1

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.8.0",
2
+ "version": "4.8.1",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -122,7 +122,7 @@
122
122
  "moment": "^2.29.4",
123
123
  "react-feather": "^2.0.10",
124
124
  "react-loading-skeleton": "^3.1.0",
125
- "react-lottie": "^1.2.3",
125
+ "lottie-react": "^2.4.0",
126
126
  "react-spinners": "^0.13.3",
127
127
  "react-switch": "^7.0.0",
128
128
  "styled-components": "^5.3.6",
@@ -2,7 +2,7 @@ import styled from '@emotion/styled/macro';
2
2
  import Box from '@mui/material/Box';
3
3
  import Color from 'color';
4
4
  import React from 'react';
5
- import Lottie from 'react-lottie';
5
+ import Lottie from 'lottie-react';
6
6
  import animationData from '../../../assets/lottie/checkout-success.json';
7
7
  import { Typography } from '../../common/Typography';
8
8
  import { CheckoutLocalization } from '../configurations/textOverrides';
@@ -59,15 +59,20 @@ const CheckoutSuccessText = styled(Typography)`
59
59
  animation: fadeIn 5s ease-in forwards;
60
60
  `;
61
61
 
62
+ const StyledLottie = styled(Lottie)`
63
+ display: flex;
64
+ justify-content: center;
65
+
66
+ svg {
67
+ width: 350px !important;
68
+ height: auto !important;
69
+ }
70
+ `;
71
+
62
72
  export function CheckoutSuccess({ checkoutLocalization }: { checkoutLocalization: CheckoutLocalization }) {
63
73
  return (
64
74
  <CheckoutSuccessContainer className="stigg-checkout-success-container">
65
- <Lottie
66
- width={350}
67
- height="auto"
68
- isClickToPauseDisabled
69
- options={{ loop: false, autoplay: true, animationData }}
70
- />
75
+ <StyledLottie animationData={animationData} loop={false} autoplay />
71
76
  <CheckoutSuccessText variant="h1" color="primary.main">
72
77
  {checkoutLocalization.summary.checkoutSuccessText}
73
78
  </CheckoutSuccessText>
@@ -185,7 +185,7 @@ export function PlanOffering({
185
185
 
186
186
  return (
187
187
  <PlanOfferingContainer
188
- className={classNames('stigg-plan-offering-container', {
188
+ className={classNames(`stigg-${plan.id}`, 'stigg-plan-offering-container', {
189
189
  'stigg-current-plan': plan.isCurrentCustomerPlan,
190
190
  })}
191
191
  $isHighlighted={isHighlighted}