Allow choosing destination calendar per event type (#1514)
This commit is contained in:
1 parent
7737164bbf
commit
8f6f34931b
48 files changed
+1448
-510
No files matched your search
@@ -6,7 +6,6 @@ import React, { SyntheticEvent, useEffect, useState } from "react";
|
||||
|
||||
import { PaymentData } from "@ee/lib/stripe/server";
|
||||
|
||||
import useDarkMode from "@lib/core/browser/useDarkMode";
|
||||
import { useLocale } from "@lib/hooks/useLocale";
|
||||
|
||||
import Button from "@components/ui/Button";
|
||||
@@ -18,8 +17,8 @@ const CARD_OPTIONS: stripejs.StripeCardElementOptions = {
|
||||
},
|
||||
style: {
|
||||
base: {
|
||||
color: "#000",
|
||||
iconColor: "#000",
|
||||
color: "#666",
|
||||
iconColor: "#666",
|
||||
fontFamily: "ui-sans-serif, system-ui",
|
||||
fontSmoothing: "antialiased",
|
||||
fontSize: "16px",
|
||||
@@ -53,18 +52,10 @@ export default function PaymentComponent(props: Props) {
|
||||
const stripe = useStripe();
|
||||
const elements = useElements();
|
||||
|
||||
const { isDarkMode } = useDarkMode();
|
||||
|
||||
useEffect(() => {
|
||||
elements?.update({ locale: i18n.language as StripeElementLocale });
|
||||
}, [elements, i18n.language]);
|
||||
|
||||
if (isDarkMode) {
|
||||
CARD_OPTIONS.style!.base!.color = "#fff";
|
||||
CARD_OPTIONS.style!.base!.iconColor = "#fff";
|
||||
CARD_OPTIONS.style!.base!["::placeholder"]!.color = "#fff";
|
||||
}
|
||||
|
||||
const handleChange = async (event: StripeCardElementChangeEvent) => {
|
||||
// Listen for changes in the CardElement
|
||||
// and display any errors as the customer types their card details
|
||||
|
||||
Reference in new issue
Block a user