refactor: Setting redesign (#11124)
Co-authored-by: Peer Richelsen <[email protected]>
This commit is contained in:
1 parent
85a1713897
commit
685be1663e
33 files changed
+1184
-782
No files matched your search
@@ -5,6 +5,7 @@ import Cropper from "react-easy-crop";
|
||||
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
|
||||
import type { ButtonColor } from "../..";
|
||||
import { Button, Dialog, DialogClose, DialogContent, DialogTrigger, DialogFooter } from "../..";
|
||||
import { showToast } from "../toast";
|
||||
|
||||
@@ -65,6 +66,7 @@ type ImageUploaderProps = {
|
||||
handleAvatarChange: (imageSrc: string) => void;
|
||||
imageSrc?: string;
|
||||
target: string;
|
||||
triggerButtonColor?: ButtonColor;
|
||||
};
|
||||
|
||||
interface FileEvent<T = Element> extends FormEvent<T> {
|
||||
@@ -117,6 +119,7 @@ export default function ImageUploader({
|
||||
id,
|
||||
buttonMsg,
|
||||
handleAvatarChange,
|
||||
triggerButtonColor,
|
||||
...props
|
||||
}: ImageUploaderProps) {
|
||||
const { t } = useLocale();
|
||||
@@ -169,7 +172,7 @@ export default function ImageUploader({
|
||||
(opened) => !opened && setFile(null) // unset file on close
|
||||
}>
|
||||
<DialogTrigger asChild>
|
||||
<Button color="secondary" type="button" className="py-1 text-sm">
|
||||
<Button color={triggerButtonColor ?? "secondary"} type="button" className="py-1 text-sm">
|
||||
{buttonMsg}
|
||||
</Button>
|
||||
</DialogTrigger>
|
||||
|
||||
Reference in new issue
Block a user