You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add the ability to scroll by a relative amount (ie. if the window is scrolled down by 100px, we should be able to scroll by -50px to end at 50px scrolled)
exportfunctionaddTen(input){if(!input||typeofinput!=="number"){console.warn(`Invalid input (${input}) given to relative(). Is this a number?`);}returnfunction(element,isHorizontal){if(!element||!isHorizontal){returninput;}returninput+10;};}
Add the ability to scroll by a relative amount (ie. if the window is scrolled down by 100px, we should be able to scroll by -50px to end at 50px scrolled)
This is resolved:
#79
The way this is handled also gives rise to extensible value handlers. An example with the new
relative()
function:Looking at the implementation of
relative()
: https://github.com/ganderzz/react-scroll-to/pull/79/files#diff-cfc450c9626bea8788ec583b684d167bUsers could add their own functions:
^ Will scroll down by 30px
The text was updated successfully, but these errors were encountered: