({
file,
className,
onRemove,
}: {
file: File;
className?: string;
onRemove: () => void;
})
| 44 | }; |
| 45 | |
| 46 | export const FileAttachmentPill = ({ |
| 47 | file, |
| 48 | className, |
| 49 | onRemove, |
| 50 | }: { |
| 51 | file: File; |
| 52 | className?: string; |
| 53 | onRemove: () => void; |
| 54 | }) => { |
| 55 | const [isHovered, setIsHovered] = useState(false); |
| 56 | |
| 57 | return ( |
| 58 | <div |
| 59 | className={cn( |
| 60 | "py-1 px-1.5 bg-muted rounded-md cursor-pointer flex flex-row gap-1 items-center text-xs", |
| 61 | className, |
| 62 | )} |
| 63 | onMouseEnter={() => setIsHovered(true)} |
| 64 | onMouseLeave={() => setIsHovered(false)} |
| 65 | > |
| 66 | {isHovered ? ( |
| 67 | <XIcon className="h-3 w-3 mt-0.5" onClick={onRemove} /> |
| 68 | ) : ( |
| 69 | renderFileIcon(file) |
| 70 | )} |
| 71 | {file.name} |
| 72 | </div> |
| 73 | ); |
| 74 | }; |
| 75 | |
| 76 | export const SendButton = ({ |
| 77 | isLoading, |
nothing calls this directly
no test coverage detected
searching dependent graphs…