feat: match edit user sheet designs (#18243)
* edit sheet design changes * remove attribute header
This commit is contained in:
1 parent
0bd7227150
commit
34b0753f8d
3 files changed
+15
-13
No files matched your search
@@ -59,7 +59,7 @@ export const buttonClasses = cva(
|
||||
"border border-default text-emphasis hover:text-red-700 dark:hover:text-red-100 focus-visible:text-red-700 hover:border-red-100 focus-visible:border-red-100 hover:bg-error focus-visible:bg-error focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset focus-visible:ring-red-700 disabled:bg-red-100 disabled:border-red-200 disabled:text-red-700 disabled:hover:border-red-200 disabled:opacity-40",
|
||||
},
|
||||
size: {
|
||||
sm: "px-3 py-2 leading-4 rounded-sm" /** For backwards compatibility */,
|
||||
sm: "px-3 py-2 leading-4 rounded-md" /** For backwards compatibility */,
|
||||
base: "h-9 px-4 py-2.5 ",
|
||||
lg: "h-[36px] px-4 py-2.5 ",
|
||||
},
|
||||
|
||||
@@ -6,7 +6,7 @@ import Cropper from "react-easy-crop";
|
||||
import checkIfItFallbackImage from "@calcom/lib/checkIfItFallbackImage";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
|
||||
import type { ButtonColor } from "../button";
|
||||
import type { ButtonColor, ButtonProps } from "../button";
|
||||
import { Button } from "../button";
|
||||
import { Dialog, DialogClose, DialogContent, DialogTrigger, DialogFooter } from "../dialog";
|
||||
import { showToast } from "../toast";
|
||||
@@ -18,6 +18,7 @@ const MAX_IMAGE_SIZE = 512;
|
||||
type ImageUploaderProps = {
|
||||
id: string;
|
||||
buttonMsg: string;
|
||||
buttonSize?: ButtonProps["size"];
|
||||
handleAvatarChange: (imageSrc: string) => void;
|
||||
imageSrc?: string;
|
||||
target: string;
|
||||
@@ -78,6 +79,7 @@ export default function ImageUploader({
|
||||
uploadInstruction,
|
||||
disabled = false,
|
||||
testId,
|
||||
buttonSize,
|
||||
}: ImageUploaderProps) {
|
||||
const { t } = useLocale();
|
||||
const [croppedAreaPixels, setCroppedAreaPixels] = useState<Area | null>(null);
|
||||
@@ -130,6 +132,7 @@ export default function ImageUploader({
|
||||
color={triggerButtonColor ?? "secondary"}
|
||||
type="button"
|
||||
disabled={disabled}
|
||||
size={buttonSize}
|
||||
data-testid={testId ? `open-upload-${testId}-dialog` : "open-upload-avatar-dialog"}
|
||||
className="cursor-pointer py-1 text-sm">
|
||||
{buttonMsg}
|
||||
|
||||
Reference in new issue
Block a user