fix: type error and border (#6520)

* fix: type error and border

Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in>

* fix: sepeator

Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in>

Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in>
This commit is contained in:
Udit Takkar
2023-01-17 17:12:22 +00:00
committed by GitHub
parent c78f4deaf7
commit 71833c0737
5 changed files with 14 additions and 4 deletions
@@ -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>
@@ -185,6 +185,7 @@ const Actions = ({
{t("Copy Typeform Redirect Url")}
</FormAction>
) : null}
<DropdownMenuSeparator />
<FormAction
action="_delete"
routingForm={form}
+2 -1
View File
@@ -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 &
@@ -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;
+1
View File
@@ -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";