Skip to content

Commit 230ccd1

Browse files
committed
🚀 RELEASE: v=2.0.0 on npm
1 parent bd47797 commit 230ccd1

File tree

4 files changed

+22
-21
lines changed

4 files changed

+22
-21
lines changed

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -84,22 +84,22 @@ import ScrollSpy from "react-ui-scrollspy";
8484

8585
### 🔧 Refs
8686

87-
| Attributes | Type | Description | Default | Required |
88-
| :------------------------- | :------------------------------------------------ | :---------------------------------------------------------------------------------------------------------------- | :------ | :------- |
89-
| `navContainerRef` | MutableRefObject<br><HTMLDivElement \| null><br/> | `ref` to your navigation container containing items with `data-to-scrollspy-id` attributes | - | no |
90-
| `parentScrollContainerRef` | MutableRefObject<br><HTMLDivElement \| null><br/> | If you want to spy only on a particular scrollable `container (Element)` then pass a ref of the same to this prop | - | no |
87+
| Attributes | Type | Description | Default | Required |
88+
| :------------------------- | :------------------------------------------------ | :------------------------------------------------------------------------------------------------------ | :------ | :------- |
89+
| `navContainerRef` | MutableRefObject<br><HTMLDivElement \| null><br/> | `ref` to your navigation container containing items with `data-to-scrollspy-id` attributes | - | no |
90+
| `parentScrollContainerRef` | MutableRefObject<br><HTMLDivElement \| null><br/> | If you want to spy only on a particular scrollable `container (Element)` then pass its ref to this prop | - | no |
9191

92-
### 🔧 Throlle
92+
### 🔧 Throttle
9393

94-
| Attributes | Type | Description | Default | Required |
95-
| :--------------- | :------- | :--------------------------------------------------------------------------------------------------------------------- | :------ | :------- |
96-
| `scrollThrottle` | `number` | In `milliseconds` to throttle the `onscroll` event. Lower the number, better the response, higher the performance cost | `300` | no |
94+
| Attributes | Type | Description | Default | Required |
95+
| :--------------- | :------- | :-------------------------------------------------------------------------------------------------------------------------- | :------ | :------- |
96+
| `scrollThrottle` | `number` | In `milliseconds` to throttle the `onscroll` event. Lower the number, better the response time, higher the performance cost | `300` | no |
9797

9898
### 🔧 Callback
9999

100-
| Attributes | Type | Description | Default | Required |
101-
| :----------------- | :--------------------- | :-------------------------------------------------------------------------------------------------------------- | :------ | :------- |
102-
| `onUpdateCallback` | `(id: string) => void` | Executes this function whenever you scroll to an `Element`, callback returns the `id` of that `Element` as well | - | no |
100+
| Attributes | Type | Description | Default | Required |
101+
| :----------------- | :--------------------- | :--------------------------------------------------------------------------------------------------------------------------------- | :------ | :------- |
102+
| `onUpdateCallback` | `(id: string) => void` | Executes this function whenever you scroll to a new ScrollSpy child `Element`, callback returns the `id` of that `Element` as well | - | no |
103103

104104
### 🔧 Offsets
105105

@@ -110,10 +110,10 @@ 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` is in view | `"active-scroll-spy"` | 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 |
117117

118118
## 📝 Authors
119119

dev.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,4 @@ git commit -m "‼️ BREAKING: "
2525

2626
## TODO
2727

28-
- [ ] deploy test website on github pages
29-
- [ ] deploy as version 2
28+
- [ ] view on github button on website

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "react-ui-scrollspy",
3-
"version": "1.0.2",
4-
"description": "Simple, Easy To Use and Customisable ScrollSpy component for react with callback, typescript, throttle support among others",
3+
"version": "2.0.0",
4+
"description": "Simple, Easy To Use and Customisable ScrollSpy component for react with callback, typescript and throttle support among others",
55
"main": "dist/index.js",
66
"scripts": {
77
"build": "rollup -c",
@@ -20,6 +20,8 @@
2020
"keywords": [
2121
"react",
2222
"react-component",
23+
"react-ui",
24+
"react-ui-scrollspy",
2325
"ui",
2426
"typescript",
2527
"component",

0 commit comments

Comments
 (0)