Allow choosing destination calendar per event type (#1514)

This commit is contained in:
Omar López authored and GitHub committed 2022-01-21 14:35:31 -07:00
1 parent 7737164bbf
commit 8f6f34931b
48 files changed
+1448 -510

No files matched your search

+2 -11
View File
@@ -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