Skip to content

Commit

Permalink
Merge pull request #394 from javigaralva/fix/layout-shift
Browse files Browse the repository at this point in the history
fix: layout shift when password is moving
  • Loading branch information
midudev committed Nov 8, 2022
2 parents f55ef23 + b94d9ab commit 87ccf34
Showing 1 changed file with 20 additions and 16 deletions.
36 changes: 20 additions & 16 deletions src/components/javigaralva/password-generator-app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,25 +88,29 @@ export default function Main() {
return (
<div className='w-screen h-screen bg-stone-800'>
<div className='flex place-content-center h-screen'>
<div className='flex flex-col min-w-100 place-items-center justify-evenly'>
<div className='grid min-w-100 place-items-center justify-evenly grid-rows-1'>
<div className='min-h-min mx-10 text-center mt-32'>
<ColorizedPassword password={password} />
</div>
<div className='flex flex-col place-items-center gap-10'>
<button
className='bg-yellow-600 rounded min-w-fit font-black uppercase py-2 w-60 text-lg text-black/75 tracking-wide duration-300 hover:shadow-yellow-400/25 scale-100 hover:bg-yellow-500 active:scale-95 shadow-2xl shadow-slate-900'
onClick={handleGeneratePassword}
>
Generate
</button>
<input
className='w-60 h-1 outline-2 rounded-lg outline-dotted outline-offset-8 outline-slate-50/25 appearance-none cursor-pointer bg-yellow-600/50 accent-yellow-600'
type='range'
min={MIN_PASSWORD_LENGTH}
max={MAX_PASSWORD_LENGTH}
value={passwordLength}
onChange={handleOnChangeSlider}
/>
<div className='flex justify-center items-end min-w-full min-h-full'>
<div className='mb-32 sm:mb-48'>
<div className='flex flex-col place-items-center gap-10'>
<button
className='bg-yellow-600 rounded min-w-fit font-black uppercase py-2 w-60 text-lg text-black/75 tracking-wide duration-300 hover:shadow-yellow-400/25 scale-100 hover:bg-yellow-500 active:scale-95 shadow-2xl shadow-slate-900'
onClick={handleGeneratePassword}
>
Generate
</button>
<input
className='w-60 h-1 outline-2 rounded-lg outline-dotted outline-offset-8 outline-slate-50/25 appearance-none cursor-pointer bg-yellow-600/50 accent-yellow-600'
type='range'
min={MIN_PASSWORD_LENGTH}
max={MAX_PASSWORD_LENGTH}
value={passwordLength}
onChange={handleOnChangeSlider}
/>
</div>
</div>
</div>
</div>
</div>
Expand Down

1 comment on commit 87ccf34

@vercel
Copy link

@vercel vercel bot commented on 87ccf34 Nov 8, 2022

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.