diff --git a/apps/web/components/Embed.tsx b/apps/web/components/Embed.tsx
index 761cb87610..7d431cfc49 100644
--- a/apps/web/components/Embed.tsx
+++ b/apps/web/components/Embed.tsx
@@ -44,6 +44,7 @@ type PreviewState = {
palette: {
brandColor: string;
};
+ hideEventTypeDetails: boolean;
};
const queryParamsForDialog = ["embedType", "embedTabName", "embedUrl"];
@@ -125,10 +126,12 @@ const getEmbedUIInstructionString = ({
apiName,
theme,
brandColor,
+ hideEventTypeDetails,
}: {
apiName: string;
theme?: string;
brandColor: string;
+ hideEventTypeDetails: boolean;
}) => {
theme = theme !== "auto" ? theme : undefined;
return getInstructionString({
@@ -141,6 +144,7 @@ const getEmbedUIInstructionString = ({
brandColor,
},
},
+ hideEventTypeDetails: hideEventTypeDetails,
},
});
};
@@ -253,18 +257,21 @@ const getEmbedTypeSpecificString = ({
apiName: string;
theme: PreviewState["theme"];
brandColor: string;
+ hideEventTypeDetails: boolean;
};
if (embedFramework === "react") {
uiInstructionStringArg = {
apiName: "cal",
theme: previewState.theme,
brandColor: previewState.palette.brandColor,
+ hideEventTypeDetails: previewState.hideEventTypeDetails,
};
} else {
uiInstructionStringArg = {
apiName: "Cal",
theme: previewState.theme,
brandColor: previewState.palette.brandColor,
+ hideEventTypeDetails: previewState.hideEventTypeDetails,
};
}
if (!frameworkCodes[embedType]) {
@@ -689,6 +696,7 @@ const EmbedTypeCodeAndPreviewDialogContent = ({
theme: Theme.auto,
floatingPopup: {},
elementClick: {},
+ hideEventTypeDetails: false,
palette: {
brandColor: "#000000",
},
@@ -753,6 +761,7 @@ const EmbedTypeCodeAndPreviewDialogContent = ({
name: "ui",
arg: {
theme: previewState.theme,
+ hideEventTypeDetails: previewState.hideEventTypeDetails,
styles: {
branding: {
...previewState.palette,
@@ -811,7 +820,7 @@ const EmbedTypeCodeAndPreviewDialogContent = ({
{embed.title}
-
+
Embed Window Sizing
×
{
@@ -888,7 +895,6 @@ const EmbedTypeCodeAndPreviewDialogContent = ({
Button Text
{/* Default Values should come from preview iframe */}
{
setPreviewState((previewState) => {
@@ -1004,6 +1010,20 @@ const EmbedTypeCodeAndPreviewDialogContent = ({
+
+
{
+ setPreviewState((previewState) => {
+ return {
+ ...previewState,
+ hideEventTypeDetails: checked,
+ };
+ });
+ }}
+ />
+ {t("hide_eventtype_details")}
+