File tree Expand file tree Collapse file tree 1 file changed +18
-11
lines changed
apps/web/app/(org)/dashboard/settings/account/components Expand file tree Collapse file tree 1 file changed +18
-11
lines changed Original file line number Diff line number Diff line change 11"use client" ;
22
33import { Button } from "@cap/ui" ;
4- import { faImage } from "@fortawesome/free-solid-svg-icons" ;
4+ import { faImage , faTrash } from "@fortawesome/free-solid-svg-icons" ;
55import { FontAwesomeIcon } from "@fortawesome/react-fontawesome" ;
66import clsx from "clsx" ;
77import Image from "next/image" ;
88import { useEffect , useRef , useState } from "react" ;
99import { toast } from "sonner" ;
10+ import { Tooltip } from "@/components/Tooltip" ;
1011
1112interface 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 >
You can’t perform that action at this time.
0 commit comments