File tree Expand file tree Collapse file tree 4 files changed +16
-8
lines changed Expand file tree Collapse file tree 4 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -110,11 +110,11 @@ import ScrollSpy from "react-ui-scrollspy";
110110
111111### 🔧 Customize Attributes
112112
113- | Attributes | Type | Description | Default | Required |
114- | :----------------- | :-------- | :------------------------------------------------------------------------------- | :-------------------- | :------- |
115- | ` useDataAttribute ` | ` string ` | To customize the string after ` data- ` | ` "to-scrollspy-id" ` | no |
116- | ` activeClass ` | ` string ` | To customize the ` class ` added when the ` Element ` in view | ` "active-scroll-spy" ` | no |
117- | ` useBoxMethod ` | ` boolean ` | Set to ` false ` if you want your spy to be active if 50% of that ` div ` is in view | ` true ` | no |
113+ | Attributes | Type | Description | Default | Required |
114+ | :----------------- | :-------- | :------------------------------------------------------------------------------------------------------- | :-------------------- | :------- |
115+ | ` useDataAttribute ` | ` string ` | To customize the string after ` data- ` | ` "to-scrollspy-id" ` | no |
116+ | ` activeClass ` | ` string ` | To customize the ` class ` added when the ` Element ` in view | ` "active-scroll-spy" ` | no |
117+ | ` useBoxMethod ` | ` boolean ` | Set to ` false ` if you want your spy to be active only if more than ` 50% ` of that ` div ` is in the viewport | ` true ` | no |
118118
119119## 📝 Authors
120120
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ const Buttons = (props: Props) => {
99 href = "https://github.com/pettiboy/react-ui-scrollspy/"
1010 target = "_blank"
1111 >
12- < div className = { "button button-size" } >
12+ < div className = { "button button-size text-dark " } >
1313 < div style = { { marginRight : 10 , marginTop : 5 } } >
1414 < img
1515 src = { `${ process . env . PUBLIC_URL } /assets/gh-logo.png` }
Original file line number Diff line number Diff line change 6767.ss-active-demo-2 {
6868 border-radius : 10px ;
6969 transition : all 0.5s ;
70- background : blue ;
70+ background : brown ;
7171}
Original file line number Diff line number Diff line change @@ -68,9 +68,17 @@ const Demo2 = (props: Props) => {
6868 </ div >
6969
7070 < div className = "col-md-8 col-sm-8 col-lg-8 flex-column d-flex justify-content-center p-0" >
71- < div ref = { parentScrollContainerRef } >
71+ < div
72+ ref = { parentScrollContainerRef }
73+ // style={{
74+ // position: "relative",
75+ // overflowY: "scroll",
76+ // height: "50vh",
77+ // }}
78+ >
7279 < ScrollSpy
7380 useBoxMethod
81+ // parentScrollContainerRef={parentScrollContainerRef}
7482 activeClass = "ss-active-demo-2"
7583 scrollThrottle = { 100 }
7684 >
You can’t perform that action at this time.
0 commit comments