Skip to content

Commit 409f871

Browse files
authored
add two minor fixes (#243)
* add two minor fixes * bump
1 parent 9284899 commit 409f871

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@schematichq/schematic-components",
3-
"version": "0.4.0",
3+
"version": "0.4.1",
44
"main": "dist/schematic-components.cjs.js",
55
"module": "dist/schematic-components.esm.js",
66
"types": "dist/schematic-components.d.ts",

components/src/components/shared/checkout-dialog/Checkout.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,12 @@ export const Checkout = ({
105105
<Text $size={18}>{t("Add payment method")}</Text>
106106
</Box>
107107

108-
<PaymentForm onConfirm={(value) => setPaymentMethodId(value)} />
108+
<PaymentForm
109+
onConfirm={(value) => {
110+
setPaymentMethodId(value);
111+
togglePaymentForm();
112+
}}
113+
/>
109114

110115
{data.subscription?.paymentMethod && (
111116
<Box>

components/src/components/shared/payment-form/PaymentForm.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ export const PaymentForm = ({ onConfirm }: PaymentFormProps) => {
8484
id="submit"
8585
disabled={isLoading || !stripe || !elements || isConfirmed}
8686
isLoading={isLoading}
87+
style={{ flexShrink: 0 }}
8788
$color="primary"
8889
>
8990
{isLoading ? t("Loading") : t("Save payment method")}

0 commit comments

Comments
 (0)