@codecademy/brand 1.15.0 → 1.15.1-alpha.cfbb0dad44.0

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.
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
  export interface PastDueModalProps {
3
3
  pastDueErrorCode: string;
4
- isPaypalPayment: boolean;
5
4
  isSilverPlan: boolean;
6
5
  closeButton: React.ReactNode;
7
6
  updatePaymentButton: React.ReactNode;
@@ -1,45 +1,19 @@
1
- import { Box, FillButton, FlexBox, Text } from '@codecademy/gamut';
2
- import { MiniOpenIcon } from '@codecademy/gamut-icons';
1
+ import { Box, FlexBox, Text } from '@codecademy/gamut';
3
2
  import React from 'react';
4
3
  import { pastDueErrorMessages } from '../pastDueMessages';
5
- import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
6
- const PayPalPastDueModal = _ref => {
7
- let {
8
- isSilverPlan
9
- } = _ref;
10
- return /*#__PURE__*/_jsxs(Box, {
11
- children: [/*#__PURE__*/_jsxs(Text, {
12
- mb: 12,
13
- children: ["Your payment did not go through. To keep learning with Codecademy", ' ', isSilverPlan ? 'Plus' : 'Pro', ", please update your payment method through PayPal."]
14
- }), /*#__PURE__*/_jsxs(Text, {
15
- mb: 12,
16
- children: ["After logging into PayPal, go to Settings ", '>', " Payments ", '>', " Automatic payments. Select Codecademy to update your payment method."]
17
- })]
18
- });
19
- };
20
- const GoToPayPalButton = () => /*#__PURE__*/_jsxs(FillButton, {
21
- href: "https://www.paypal.com",
22
- target: "_blank",
23
- children: [/*#__PURE__*/_jsx(Text, {
24
- mr: 10,
25
- children: "Go to PayPal "
26
- }), /*#__PURE__*/_jsx(MiniOpenIcon, {})]
27
- });
28
- export const PastDueModalContents = _ref2 => {
4
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
5
+ export const PastDueModalContents = _ref => {
29
6
  let {
30
7
  pastDueErrorCode,
31
- isPaypalPayment,
32
8
  isSilverPlan,
33
9
  closeButton,
34
10
  updatePaymentButton
35
- } = _ref2;
11
+ } = _ref;
36
12
  const pastDueErrorMessage = pastDueErrorMessages(isSilverPlan, false)[pastDueErrorCode] || pastDueErrorMessages(isSilverPlan, false).default;
37
13
  return /*#__PURE__*/_jsxs(_Fragment, {
38
14
  children: [/*#__PURE__*/_jsx(FlexBox, {
39
15
  column: true,
40
- children: isPaypalPayment ? /*#__PURE__*/_jsx(PayPalPastDueModal, {
41
- isSilverPlan: true
42
- }) : /*#__PURE__*/_jsxs(Box, {
16
+ children: /*#__PURE__*/_jsxs(Box, {
43
17
  children: [/*#__PURE__*/_jsx(Text, {
44
18
  mb: 12,
45
19
  children: pastDueErrorMessage.text1
@@ -51,7 +25,7 @@ export const PastDueModalContents = _ref2 => {
51
25
  }), /*#__PURE__*/_jsxs(FlexBox, {
52
26
  justifyContent: "end",
53
27
  alignItems: "end",
54
- children: [closeButton, isPaypalPayment ? /*#__PURE__*/_jsx(GoToPayPalButton, {}) : updatePaymentButton]
28
+ children: [closeButton, updatePaymentButton]
55
29
  })]
56
30
  });
57
31
  };
@@ -34,9 +34,6 @@ const meta = {
34
34
  })
35
35
  }
36
36
  },
37
- isPaypalPayment: {
38
- control: 'boolean'
39
- },
40
37
  isSilverPlan: {
41
38
  control: 'boolean'
42
39
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@codecademy/brand",
3
3
  "description": "Brand component library for Codecademy",
4
- "version": "1.15.0",
4
+ "version": "1.15.1-alpha.cfbb0dad44.0",
5
5
  "author": "Codecademy Engineering <dev@codecademy.com>",
6
6
  "dependencies": {
7
7
  "@emotion/is-prop-valid": "^1.2.1",