fix scrolltobottom button pos
This commit is contained in:
parent
f994e2ca5d
commit
b9d2f0a156
|
|
@ -21,7 +21,7 @@ const MessageWrapper = () => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<main className="messages-wrapper rounded-md w-full max-w-3xl flex flex-col flex-shrink relative overflow-y-hidden">
|
<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
|
{isLoading
|
||||||
? ''
|
? ''
|
||||||
: isError
|
: isError
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ const ScrollToBottom = ({ children, className = '' }: { children: ReactNode; cla
|
||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
onClick={() => node?.scrollIntoView({ behavior: 'smooth' })}
|
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">
|
<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" />
|
<FaChevronDown className="fill-grey-light hover:fill-grey-dark transition-all text-xl w-10 h-10 p-2.5" />
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue