Hide pull-to-refresh when not pulling (#1986)
This commit is contained in:
parent
964cdc1d61
commit
63704a5f0f
@ -72,7 +72,10 @@ export default function PullToRefresh ({ children, className }) {
|
||||
onTouchMove={handleTouchMove}
|
||||
onTouchEnd={handleTouchEnd}
|
||||
>
|
||||
<p className={`${styles.pullMessage}`} style={{ top: `${Math.max(-20, Math.min(-20 + pullDistance / 2, 5))}px` }}>
|
||||
<p
|
||||
className={`${styles.pullMessage}`}
|
||||
style={{ opacity: pullDistance > 0 ? 1 : 0, top: `${Math.max(-20, Math.min(-20 + pullDistance / 2, 5))}px` }}
|
||||
>
|
||||
{pullMessage}
|
||||
</p>
|
||||
{children}
|
||||
|
Loading…
x
Reference in New Issue
Block a user