Skip to content

Commit

Permalink
Initial package version
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahcssiqueira committed Aug 6, 2024
0 parents commit bc1956d
Show file tree
Hide file tree
Showing 12 changed files with 2,994 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"presets": ["@babel/preset-react"]
}

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.DS_Store
node_modules/
dist/
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
src/
.gitignore
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) [2024] [Sarah C. Siqueira]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
54 changes: 54 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Scroll Bar Indicator

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

`ScrollBarIndicator` is a customizable React component that displays a scroll position indicator.

<p align="center">
![screenshot](./src/assets/scroll-bar-indicator-screenshot.png)
</p>



## Usage

### Install

To install the `scroll-bar-indicator` package, run:

`npm install scroll-bar-indicator` or

`yarn add scroll-bar-indicator`

### Import

Import the ScrollBarIndicator in your React application:

`import ScrollBarIndicator from 'scroll-bar-indicator';`

Add the component with your custom props.

```
<ScrollBarIndicator
barColor="rgb(200, 200, 200)"
barHeight = "2rem",
indicatorColor="rgb(14, 179, 170)"
infoColor="rgb(51, 51, 51)"
showInfo={true}
/>
```

### Props

To customize, use the props below into the ScrollBarIndicator:

- `barColor` (string): Background color of the scroll bar. Default is `rgb(179, 179, 179)`.
- `barHeight` (string): Defines the bar height. Default is `2 rem`.
- `indicatorColor` (string): Background color of the scroll indicator. Default is `rgb(14, 179, 170)`.
- `infoColor` (string): Color of the scroll info text. Default is `rgb(51, 51, 51)`.
- `showInfo` (boolean): Whether to display the scroll info text. Default is `true`.

## License

MIT
Loading

0 comments on commit bc1956d

Please sign in to comment.