File tree Expand file tree Collapse file tree 2 files changed +8
-22
lines changed Expand file tree Collapse file tree 2 files changed +8
-22
lines changed Original file line number Diff line number Diff line change @@ -16,11 +16,11 @@ const Scrollama = props => {
1616 const {
1717 debug,
1818 children,
19- offset,
20- onStepEnter,
21- onStepExit,
22- onStepProgress,
23- threshold,
19+ offset = 0.3 ,
20+ onStepEnter = ( ) => { } ,
21+ onStepExit = ( ) => { } ,
22+ onStepProgress = null ,
23+ threshold = 4 ,
2424 } = props ;
2525 const isOffsetDefinedInPixels = isOffsetInPixels ( offset )
2626 const [ lastScrollTop , setLastScrollTop ] = useState ( 0 ) ;
@@ -72,12 +72,4 @@ const Scrollama = props => {
7272 ) ;
7373} ;
7474
75- Scrollama . defaultProps = {
76- onStepProgress : null ,
77- onStepEnter : ( ) => { } ,
78- onStepExit : ( ) => { } ,
79- threshold : 4 ,
80- offset : 0.3 ,
81- } ;
82-
8375export default Scrollama ;
Original file line number Diff line number Diff line change @@ -18,9 +18,9 @@ const Step = props => {
1818 data,
1919 handleSetLastScrollTop,
2020 lastScrollTop,
21- onStepEnter,
22- onStepExit,
23- onStepProgress,
21+ onStepEnter = ( ) => { } ,
22+ onStepExit = ( ) => { } ,
23+ onStepProgress = null ,
2424 offset,
2525 scrollamaId,
2626 progressThreshold,
@@ -96,10 +96,4 @@ const Step = props => {
9696 } ) ;
9797} ;
9898
99- Step . defaultProps = {
100- onStepProgress : null ,
101- onStepEnter : ( ) => { } ,
102- onStepExit : ( ) => { } ,
103- } ;
104-
10599export default Step ;
You can’t perform that action at this time.
0 commit comments