@rebilly/instruments 3.26.2-beta.0 → 3.26.3-beta.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rebilly/instruments",
3
- "version": "3.26.2-beta.0",
3
+ "version": "3.26.3-beta.0",
4
4
  "author": "Rebilly",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -92,7 +92,7 @@ export const vars = (theme) => `
92
92
  background-size: 200% 100%;
93
93
  -webkit-animation: 1.5s rebillyExpressShine linear infinite;
94
94
  animation: 1.5s rebillyExpressShine linear infinite;
95
- height: 48px;
95
+ min-height: 48px;
96
96
  }
97
97
 
98
98
  .rebilly-instruments-express-methods .rebilly-instruments-express-methods-container > *:last-child {
@@ -4,7 +4,7 @@ export default function mountExpressMethod({
4
4
  }) {
5
5
  const {Rebilly} = window;
6
6
  const container = document.querySelector(`.rebilly-instruments-${id}-method`);
7
-
7
+
8
8
  // Hack: The correct way to do this is to accept the options via the framepay package
9
9
  // Will remove once these options are added to framepay
10
10
  function updateApplePayStyling() {
@@ -21,6 +21,14 @@ export default function mountExpressMethod({
21
21
  applePayButton.style.cursor = 'pointer';
22
22
  }
23
23
 
24
+ // Update height of the container to match the height of the button
25
+ function updatePayPalStyling() {
26
+ const {
27
+ buttonHeight
28
+ } = state.options.paymentInstruments.paypal;
29
+ container.style.height = `${buttonHeight}px`;
30
+ }
31
+
24
32
  function mountButton() {
25
33
  if(!container.children.length) {
26
34
  const rebillyMountFunction = {
@@ -35,6 +43,9 @@ export default function mountExpressMethod({
35
43
  if (id === 'apple-pay') {
36
44
  updateApplePayStyling();
37
45
  }
46
+ if (id === 'pay-pal-billing-agreement') {
47
+ updatePayPalStyling();
48
+ }
38
49
  } else {
39
50
  console.warn(`method '${id}' is not supported`);
40
51
  }