@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 +2 -2
- package/dist/src/index.d.ts +1 -1
- package/package.json +2 -2
- package/src/index.tsx +1 -0
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
|
|
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
|
|
package/dist/src/index.d.ts
CHANGED
|
@@ -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.
|
|
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.
|
|
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
|
},
|