Skip to content

Commit 560a52d

Browse files
committed
👌 IMPROVE: demo-app
1 parent b249a8c commit 560a52d

File tree

4 files changed

+16
-8
lines changed

4 files changed

+16
-8
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff 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

demo-app/src/components/Buttons/Buttons.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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`}

demo-app/src/index.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,5 @@ a {
6767
.ss-active-demo-2 {
6868
border-radius: 10px;
6969
transition: all 0.5s;
70-
background: blue;
70+
background: brown;
7171
}

demo-app/src/pages/Demo2.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff 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
>

0 commit comments

Comments
 (0)