Skip to content

Commit

Permalink
Improve upload button UI
Browse files Browse the repository at this point in the history
  • Loading branch information
thisisommore committed Sep 2, 2023
1 parent b942bd8 commit 80f5282
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions src/components/OUpload/OUpload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,15 @@ const OUpload = React.forwardRef<
>
{label}
</label>
<OButton
color="yellow"
btnType="fill"
<div
className="w-full h-28 border-2 border-dashed flex justify-center items-center rounded-lg text-[#BFB00D] z-10 mt-1"
onClick={() => {
fileRef.current?.click();
}}
className={`mt-1 z-10 relative w-full ${className}`}
>
{fileName ? (
<p className="m-0 text-ellipsis whitespace-nowrap overflow-hidden">
{fileName}
</p>
) : (
<p className="m-0">{buttonText}</p>
)}
</OButton>
<p>{fileName ? fileName : buttonText}</p>
</div>

{info && <p className="text-[#0000007c] dark:text-white mt-2">{info}</p>}
<input
ref={(node) => {
Expand Down

0 comments on commit 80f5282

Please sign in to comment.