Skip to content

Commit 3301cd2

Browse files
committed
change remove button to trash button icon
1 parent 6579bb5 commit 3301cd2

File tree

1 file changed

+18
-11
lines changed

1 file changed

+18
-11
lines changed

apps/web/app/(org)/dashboard/settings/account/components/ProfileImage.tsx

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
"use client";
22

33
import { Button } from "@cap/ui";
4-
import { faImage } from "@fortawesome/free-solid-svg-icons";
4+
import { faImage, faTrash } from "@fortawesome/free-solid-svg-icons";
55
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
66
import clsx from "clsx";
77
import Image from "next/image";
88
import { useEffect, useRef, useState } from "react";
99
import { toast } from "sonner";
10+
import { Tooltip } from "@/components/Tooltip";
1011

1112
interface ProfileImageProps {
1213
initialPreviewUrl?: string | null;
@@ -113,16 +114,22 @@ export function ProfileImage({
113114
</Button>
114115
)}
115116
{(previewUrl || isRemoving) && (
116-
<Button
117-
type="button"
118-
variant="outline"
119-
disabled={disabled || isLoading}
120-
size="xs"
121-
onClick={handleRemove}
122-
spinner={isRemoving}
123-
>
124-
{isRemoving ? "Removing image..." : "Remove"}
125-
</Button>
117+
<Tooltip content="Remove image">
118+
<Button
119+
type="button"
120+
variant="outline"
121+
className="p-0 size-8"
122+
disabled={disabled || isLoading}
123+
size="icon"
124+
onClick={handleRemove}
125+
spinner={isRemoving}
126+
>
127+
<FontAwesomeIcon
128+
icon={faTrash}
129+
className="size-2.5 text-gray-12"
130+
/>
131+
</Button>
132+
</Tooltip>
126133
)}
127134
</div>
128135
<p className="text-xs text-gray-10">Recommended size: 120x120</p>

0 commit comments

Comments
 (0)