Skip to content

Commit

Permalink
input wrapped under label
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahendar0701 committed Jan 5, 2025
1 parent 031252e commit 4ebf027
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions src/components/Common/AvatarEditModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -254,27 +254,21 @@ const AvatarEditModal = ({

<div className="flex flex-col gap-2 pt-4 sm:flex-row">
<div>
<Button
id="upload-cover-image"
variant="primary"
type="button"
asChild
onClick={() =>
document.getElementById("file-input")?.click()
}
>
<div className="cursor-pointer">
<CareIcon icon="l-cloud-upload" className="text-lg" />
<Button id="upload-cover-image" variant="primary" asChild>
<label className="cursor-pointer">
<CareIcon
icon="l-cloud-upload"
className="text-lg mr-1"
/>
{t("upload_an_image")}
<input
id="file-input"
title="changeFile"
type="file"
accept="image/*"
className="hidden"
onChange={onSelectFile}
/>
</div>
</label>
</Button>
</div>
<Button
Expand Down

0 comments on commit 4ebf027

Please sign in to comment.