Skip to content

Commit

Permalink
Merge pull request #4 from hmhard/develop
Browse files Browse the repository at this point in the history
[feat]: added copy text input field on click
  • Loading branch information
hmhard authored Apr 23, 2023
2 parents 12af788 + 29b6428 commit 1f196fb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ function App() {
};

const handleCopy = () => {
if(!password)
return;
setOpenPopover(true);
copy(password);
setCopied(true);
Expand All @@ -60,7 +62,7 @@ function App() {
<Typography variant='h3' > Amharic Password Generator</Typography>
<div className="relative flex w-full mr-5">

<Input size="lg" value={password} readOnly />
<Input size="lg" value={password} onClick={handleCopy} readOnly />
<Popover open={openPopover} handler={handleCopy}>
<PopoverHandler >
<Button color="blue" onClick={handleCopy} >
Expand Down

1 comment on commit 1f196fb

@vercel
Copy link

@vercel vercel bot commented on 1f196fb Apr 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.