Skip to content

Commit

Permalink
feat(*): initial version
Browse files Browse the repository at this point in the history
  • Loading branch information
buzinas committed Oct 23, 2019
0 parents commit 5fb2210
Show file tree
Hide file tree
Showing 28 changed files with 23,696 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"presets": [
[
"@babel/env",
{
"modules": false
}
],
"@babel/react"
]
}
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
11 changes: 11 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"parser": "babel-eslint",
"extends": ["prettier", "prettier/react"],
"env": {
"es6": true
},
"plugins": ["prettier", "react", "react-hooks"],
"parserOptions": {
"sourceType": "module"
}
}
30 changes: 30 additions & 0 deletions .github/workflows/npmpublish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Publish to npm

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
- run: yarn
- run: yarn test

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: yarn
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
22 changes: 22 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
node_modules

# builds
build
dist
.rpt2_cache

# misc
.DS_Store
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
9 changes: 9 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.git
yarn.lock
rollup*
.eslint*
.babelrc
.prettierrc
.gitignore
src
example
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"trailingComma": "all"
}
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# react-custom-scroller

[![NPM](https://img.shields.io/npm/v/react-custom-scroller.svg)](https://www.npmjs.com/package/react-custom-scroller) [![JavaScript Style Guide](https://img.shields.io/badge/code%20style-prettier-success)](https://prettier.io)

Super simple React component for creating a custom scrollbar cross-browser and cross-devices.

### <img height="40px" src="./close.svg" />

Interested in working on projects like this? [Close](https://close.com) is looking for [great engineers](https://jobs.close.com) to join our team!

## Install

```bash
yarn add react-custom-scroller
```

## Benefits

- Extremely lightweight (less than 2KB minzipped).
- It uses the native scroll events, so all the events work and are smooth (mouse wheel, space, page down, page up, arrows etc).
- No other 3rd-party dependencies.
- The performance is excellent!

## Usage

```jsx
import React from 'react';
import CustomScroller from 'react-custom-scroller';

const MyScrollableDiv = () => (
<CustomScroller>Content goes here.</CustomScroller>
);
```

## License

MIT © [Close](https://github.com/closeio)
28 changes: 28 additions & 0 deletions close.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 5fb2210

Please sign in to comment.