Skip to content

Commit 6672fd4

Browse files
fix: "New" button sizing inconsistent between Workflows and Event Types pages (calcom#26066)
* fix: consistent button sizing between fab and button variants on desktop * fix: consistent button sizing between fab and button variants on desktop * fix(ui): align New button sizing across pages * fix: New button sizing inconsistent between Workflows and Event Types pages * Update Button.tsx
1 parent 6ed18bb commit 6672fd4

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

apps/web/modules/ee/teams/components/createButton/CreateButton.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { usePathname, useRouter } from "next/navigation";
44

55
import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams";
66
import { useLocale } from "@calcom/lib/hooks/useLocale";
7+
import classNames from "@calcom/ui/classNames";
78
import { Avatar } from "@calcom/ui/components/avatar";
89
import type { ButtonColor } from "@calcom/ui/components/button";
910
import { Button } from "@calcom/ui/components/button";
@@ -34,6 +35,7 @@ export type CreateBtnProps = {
3435
disableMobileButton?: boolean;
3536
"data-testid"?: string;
3637
color?: ButtonColor;
38+
className?: string;
3739
};
3840

3941
/**
@@ -53,6 +55,7 @@ export function CreateButton(props: CreateBtnProps) {
5355
buttonText,
5456
disableMobileButton,
5557
subtitle,
58+
className,
5659
...restProps
5760
} = props;
5861
const CreateDialog = createDialog ? createDialog() : null;
@@ -91,6 +94,7 @@ export function CreateButton(props: CreateBtnProps) {
9194
StartIcon="plus"
9295
loading={isPending}
9396
variant={disableMobileButton ? "button" : "fab"}
97+
className={classNames(disableMobileButton && "md:min-h-min md:min-w-min", className)}
9498
{...restProps}>
9599
{buttonText ? buttonText : t("new")}
96100
</Button>
@@ -103,6 +107,7 @@ export function CreateButton(props: CreateBtnProps) {
103107
size="sm"
104108
data-testid="create-button-dropdown"
105109
loading={isPending}
110+
className={classNames(disableMobileButton && "md:min-h-min md:min-w-min", className)}
106111
{...restProps}>
107112
{buttonText ? buttonText : t("new")}
108113
</Button>

0 commit comments

Comments
 (0)