Skip to content

Commit

Permalink
fix(ProfileBackgroundImageUploader): add input & use div instead of l…
Browse files Browse the repository at this point in the history
…abel
  • Loading branch information
BrickheadJohnny committed Sep 12, 2024
1 parent e544c39 commit 3536bd8
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const ProfileBackgroundImageUploader = ({
description,
})

const { isDragActive, getRootProps } = useDropzone({
const { isDragActive, getRootProps, getInputProps } = useDropzone({
multiple: false,
noClick: false,
onDrop: (accepted, fileRejections) => {
Expand All @@ -53,9 +53,10 @@ export const ProfileBackgroundImageUploader = ({
return (
<Tooltip>
<TooltipTrigger>
<label {...getRootProps()} className={buttonVariants(buttonProps as any)}>
<div {...getRootProps()} className={buttonVariants(buttonProps as any)}>
<input {...getInputProps()} hidden />
{isDragActive ? <UploadSimple weight="bold" size={24} /> : children}
</label>
</div>
</TooltipTrigger>
<TooltipContent side="bottom">{tooltipLabel}</TooltipContent>
</Tooltip>
Expand Down

0 comments on commit 3536bd8

Please sign in to comment.