fix: "New" button sizing inconsistent between Workflows and Event Types pages (#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
This commit is contained in:
1 parent
6ed18bba53
commit
6672fd4c3d
1 file changed
+5
@@ -4,6 +4,7 @@ import { usePathname, useRouter } from "next/navigation";
|
|||||||
|
|
||||||
import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams";
|
import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams";
|
||||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||||
|
import classNames from "@calcom/ui/classNames";
|
||||||
import { Avatar } from "@calcom/ui/components/avatar";
|
import { Avatar } from "@calcom/ui/components/avatar";
|
||||||
import type { ButtonColor } from "@calcom/ui/components/button";
|
import type { ButtonColor } from "@calcom/ui/components/button";
|
||||||
import { Button } from "@calcom/ui/components/button";
|
import { Button } from "@calcom/ui/components/button";
|
||||||
@@ -34,6 +35,7 @@ export type CreateBtnProps = {
|
|||||||
disableMobileButton?: boolean;
|
disableMobileButton?: boolean;
|
||||||
"data-testid"?: string;
|
"data-testid"?: string;
|
||||||
color?: ButtonColor;
|
color?: ButtonColor;
|
||||||
|
className?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -53,6 +55,7 @@ export function CreateButton(props: CreateBtnProps) {
|
|||||||
buttonText,
|
buttonText,
|
||||||
disableMobileButton,
|
disableMobileButton,
|
||||||
subtitle,
|
subtitle,
|
||||||
|
className,
|
||||||
...restProps
|
...restProps
|
||||||
} = props;
|
} = props;
|
||||||
const CreateDialog = createDialog ? createDialog() : null;
|
const CreateDialog = createDialog ? createDialog() : null;
|
||||||
@@ -91,6 +94,7 @@ export function CreateButton(props: CreateBtnProps) {
|
|||||||
StartIcon="plus"
|
StartIcon="plus"
|
||||||
loading={isPending}
|
loading={isPending}
|
||||||
variant={disableMobileButton ? "button" : "fab"}
|
variant={disableMobileButton ? "button" : "fab"}
|
||||||
|
className={classNames(disableMobileButton && "md:min-h-min md:min-w-min", className)}
|
||||||
{...restProps}>
|
{...restProps}>
|
||||||
{buttonText ? buttonText : t("new")}
|
{buttonText ? buttonText : t("new")}
|
||||||
</Button>
|
</Button>
|
||||||
@@ -103,6 +107,7 @@ export function CreateButton(props: CreateBtnProps) {
|
|||||||
size="sm"
|
size="sm"
|
||||||
data-testid="create-button-dropdown"
|
data-testid="create-button-dropdown"
|
||||||
loading={isPending}
|
loading={isPending}
|
||||||
|
className={classNames(disableMobileButton && "md:min-h-min md:min-w-min", className)}
|
||||||
{...restProps}>
|
{...restProps}>
|
||||||
{buttonText ? buttonText : t("new")}
|
{buttonText ? buttonText : t("new")}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
Reference in new issue
Block a user