fix scrolltobottom button pos

This commit is contained in:
Guillaume Dorce 2022-10-28 10:05:21 +02:00
parent f994e2ca5d
commit b9d2f0a156
2 changed files with 2 additions and 2 deletions

View File

@ -21,7 +21,7 @@ const MessageWrapper = () => {
return (
<main className="messages-wrapper rounded-md w-full max-w-3xl flex flex-col flex-shrink relative overflow-y-hidden">
<ScrollToBottom className="message-container flex flex-col gap-4 w-full max-w-3xl overflow-scroll pt-4 pb-6 px-2 md:px-0">
<ScrollToBottom className="message-container flex flex-col gap-4 w-full max-w-3xl overflow-y-scroll overflow-x-hidden pt-4 pb-6 px-2 md:px-0">
{isLoading
? ''
: isError

View File

@ -37,7 +37,7 @@ const ScrollToBottom = ({ children, className = '' }: { children: ReactNode; cla
</div>
<button
onClick={() => node?.scrollIntoView({ behavior: 'smooth' })}
className={'absolute right-3 transition-all' + (show ? ' bottom-3' : ' -bottom-10')}
className={'absolute right-3 transition-all' + (show ? ' bottom-3' : ' -mb-10')}
>
<div className="popup-btn cursor-pointer rounded-full shadow-lg shadow-slate-900 bg-grey-dark hover:bg-grey-light transition-all">
<FaChevronDown className="fill-grey-light hover:fill-grey-dark transition-all text-xl w-10 h-10 p-2.5" />