MCPcopy Create free account
hub / github.com/adobe/react-spectrum / scroll

Function scroll

perf/drivers.mjs:30–38  ·  view source on GitHub ↗
(target, conditions, rest = {})

Source from the content-addressed store, hash-verified

28const scrollDistance = 4000;
29const deepScrollStart = 4000 * 40;
30const scroll = (target, conditions, rest = {}) => ({
31 event: 'wheel',
32 target,
33 frames: true,
34 distance: scrollDistance,
35 speed: 2000,
36 conditions: [condition(target, {scrollTop: scrollDistance - 1}), ...conditions],
37 ...rest
38});
39
40const records = size => Array.from({length: size}, (_, i) => `item-${i}`);
41const recordLabel = id => `Record ${id.slice('item-'.length)}`;

Callers 1

drivers.mjsFile · 0.70

Calls 1

conditionFunction · 0.85

Tested by

no test coverage detected