Skip to content

Scheduling infrastructure for absolutely everyone.

fix: type error and border (#6520)

Udit Takkar71833c0737f6
diff --git a/packages/app-store/ee/routing-forms/components/FormActions.tsx b/packages/app-store/ee/routing-forms/components/FormActions.tsx
index cb31bfeeca1..f50ce25bb95 100644
--- a/packages/app-store/ee/routing-forms/components/FormActions.tsx
+++ b/packages/app-store/ee/routing-forms/components/FormActions.tsx
@@ -447,7 +447,14 @@ export const FormAction = forwardRef(function FormAction<T extends typeof Button
}
return (
<DropdownMenuItem>
- <Component ref={forwardedRef} {...actionProps}>
+ <Component
+ ref={forwardedRef}
+ {...actionProps}
+ className={classNames(
+ props.className,
+ "w-full transition-none",
+ props.color === "destructive" && "border-0"
+ )}>
{children}
</Component>
</DropdownMenuItem>
diff --git a/packages/app-store/ee/routing-forms/components/SingleForm.tsx b/packages/app-store/ee/routing-forms/components/SingleForm.tsx
index f54d97163fd..606c02c8147 100644
--- a/packages/app-store/ee/routing-forms/components/SingleForm.tsx
+++ b/packages/app-store/ee/routing-forms/components/SingleForm.tsx
@@ -185,6 +185,7 @@ const Actions = ({
{t("Copy Typeform Redirect Url")}
</FormAction>
) : null}
+ <DropdownMenuSeparator />
<FormAction
action="_delete"
routingForm={form}
diff --git a/packages/ui/components/button/Button.tsx b/packages/ui/components/button/Button.tsx
index 3ff49f04d30..bae939b50bd 100644
--- a/packages/ui/components/button/Button.tsx
+++ b/packages/ui/components/button/Button.tsx
@@ -10,6 +10,7 @@ import { Icon } from "@calcom/ui";
type InferredVariantProps = VariantProps<typeof buttonClasses>;
+export type ButtonColor = NonNullable<InferredVariantProps["color"]>;
export type ButtonBaseProps = {
/** Action that happens when the button is clicked */
onClick?: (event: React.MouseEvent<HTMLElement, MouseEvent>) => void;
@@ -22,7 +23,7 @@ export type ButtonBaseProps = {
tooltip?: string;
flex?: boolean;
} & Omit<InferredVariantProps, "color"> & {
- color?: NonNullable<InferredVariantProps["color"]>;
+ color?: ButtonColor;
};
export type ButtonProps = ButtonBaseProps &
diff --git a/packages/ui/components/form/dropdown/Dropdown.tsx b/packages/ui/components/form/dropdown/Dropdown.tsx
index a17784efd93..ed47b656608 100644
--- a/packages/ui/components/form/dropdown/Dropdown.tsx
+++ b/packages/ui/components/form/dropdown/Dropdown.tsx
@@ -5,7 +5,7 @@ import { ComponentProps, forwardRef } from "react";
import { classNames } from "@calcom/lib";
import { SVGComponent } from "@calcom/types/SVGComponent";
-import { ButtonProps } from "@calcom/ui";
+import { ButtonColor } from "@calcom/ui";
export const Dropdown = DropdownMenuPrimitive.Root;
@@ -102,7 +102,7 @@ DropdownMenuRadioItem.displayName = "DropdownMenuRadioItem";
type DropdownItemProps = {
children: React.ReactNode;
- color?: ButtonProps["color"];
+ color?: ButtonColor;
StartIcon?: SVGComponent;
EndIcon?: SVGComponent;
href?: string;
diff --git a/packages/ui/index.tsx b/packages/ui/index.tsx
index e0676f86b1b..1d35ecc3847 100644
--- a/packages/ui/index.tsx
+++ b/packages/ui/index.tsx
@@ -150,3 +150,4 @@ export {
export { default as MultiSelectCheckboxes } from "./components/form/checkbox/MultiSelectCheckboxes";
export type { Option as MultiSelectCheckboxesOptionType } from "./components/form/checkbox/MultiSelectCheckboxes";
export { default as ImageUploader } from "./components/image-uploader/ImageUploader";
+export type { ButtonColor } from "./components/button/Button";