@@ -11,6 +11,8 @@ const App = React.createClass({
1111 minHeight : '600px' ,
1212 }
1313
14+ const version = require ( '../../package.json' ) . version
15+
1416 return (
1517 < div className = "o-wrapper" >
1618
@@ -19,7 +21,13 @@ const App = React.createClass({
1921 < h2 className = "c-side-nav__heading c-heading-4 c-heading-4--upper u-font-italic" > react< br /> scrollspy</ h2 >
2022 </ div >
2123 < nav className = "c-side-nav__body" >
22- < Scrollspy items = { [ 'section-1' , 'section-2' , 'section-3' ] } currentClassName = "is-current" className = "c-side-nav__list nav-list" style = { { fontWeight : 300 } } >
24+ < Scrollspy
25+ items = { [ 'section-1' , 'section-2' , 'section-3' ] }
26+ currentClassName = "is-current"
27+ className = "c-side-nav__list nav-list"
28+ style = { { fontWeight : 300 } }
29+ offset = { - 20 }
30+ >
2331 < li className = "c-side-nav__item" > < a href = "#section-1" className = "c-side-nav__link" > Getteing Started</ a > </ li >
2432 < li className = "c-side-nav__item" > < a href = "#section-2" className = "c-side-nav__link" > Example</ a > </ li >
2533 < li className = "c-side-nav__item" > < a href = "#section-3" className = "c-side-nav__link" > Props</ a > </ li >
@@ -37,7 +45,7 @@ const App = React.createClass({
3745 < span className = "o-hero__sub-heading c-lead" > Scrollspy Component</ span >
3846 </ li >
3947 < li className = "o-inline-list__item" >
40- < span className = "c-tag" > v2.3.1 </ span >
48+ < span className = "c-tag" > v { version } </ span >
4149 </ li >
4250 </ ul >
4351 </ div >
@@ -114,6 +122,10 @@ const App = React.createClass({
114122 < td className = "c-table__data" > style</ td >
115123 < td className = "c-table__data" > Style attribute to be passed to the generated < code > { '<ul/>' } </ code > element [optional].</ td >
116124 </ tr >
125+ < tr >
126+ < td className = "c-table__data" > offset</ td >
127+ < td className = "c-table__data" > Offset value that adjusts to determine the elements are in the viewport [optional].</ td >
128+ </ tr >
117129 </ tbody >
118130 </ table >
119131 </ div >
0 commit comments