@amos.com/react-amos-js 0.2.0 → 0.3.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/README.md CHANGED
@@ -80,7 +80,7 @@ In short, your app orchestrates the payment flow, while sensitive payment data s
80
80
 
81
81
  ## Appearance
82
82
 
83
- Every component accepts an optional `appearance` prop that controls the look of the iframe UI. It contains a `themeVariables` object whose keys are CSS custom-property names and whose values are strings. You can update this prop after page load to update the iframe appearance.
83
+ Every component accepts an optional `appearance` prop that controls the look of the iframe UI. It contains a `themeVariables` object whose keys are CSS custom-property names and whose values are strings, and an optional `labels` setting (`"above"`, `"floating"`, or `"placeholder"`) for field label placement. You can update this prop after page load to update the iframe appearance.
84
84
 
85
85
  ```tsx
86
86
  <AmosCreditCardPaymentMethodForm
@@ -95,7 +95,7 @@ Every component accepts an optional `appearance` prop that controls the look of
95
95
  />
96
96
  ```
97
97
 
98
- Only the variables you provide are sent; omitted variables keep their defaults.
98
+ `themeVariables` uses a **replace** model: each update that includes `themeVariables` sets the full override set. Only the variables you list are overridden; unlisted variables revert to iframe defaults. Omit `themeVariables` to leave existing overrides unchanged.
99
99
 
100
100
  ### Available theme variables
101
101
 
@@ -1,7 +1,7 @@
1
1
  import { Appearance, CreditCardAdditionalFields } from '@amos.com/amos-js';
2
2
  import { components } from '@amos.com/node';
3
3
  import { ComponentProps, RefObject } from 'react';
4
- export type { Appearance, CreateCustomerInput, CreatePaymentIntentInput, CreateSetupIntentInput, CreditCardAdditionalFields, EmbedToken, EmbedTokenJwt, Message, PaymentIntent, RenderTokenJwt, SetupIntent, ThemeVariable, } from '@amos.com/amos-js';
4
+ export type { Appearance, AppearanceLabels, CreateCustomerInput, CreatePaymentIntentInput, CreateSetupIntentInput, CreditCardAdditionalFields, EmbedToken, EmbedTokenJwt, Message, PaymentIntent, RenderTokenJwt, SetupIntent, ThemeVariable, } from '@amos.com/amos-js';
5
5
  export { createMessage, decodeJwt, formatGooglePayPaymentData, getEmbedOrigin, } from '@amos.com/amos-js';
6
6
  type IframeRef = RefObject<HTMLIFrameElement | null> | undefined;
7
7
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amos.com/react-amos-js",
3
- "version": "0.2.0",
3
+ "version": "0.3.1",
4
4
  "main": "dist/index.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -44,7 +44,7 @@
44
44
  "vite-plugin-dts": "4.5.4"
45
45
  },
46
46
  "dependencies": {
47
- "@amos.com/amos-js": "0.2.0",
47
+ "@amos.com/amos-js": "0.3.1",
48
48
  "@amos.com/node": "0.1.6",
49
49
  "@types/googlepay": "0.7.10"
50
50
  },
package/src/index.tsx CHANGED
@@ -21,6 +21,7 @@ import {
21
21
 
22
22
  export type {
23
23
  Appearance,
24
+ AppearanceLabels,
24
25
  CreateCustomerInput,
25
26
  CreatePaymentIntentInput,
26
27
  CreateSetupIntentInput,