-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
468 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
.idea/ | ||
package-lock.json |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Contributor Code of Conduct | ||
|
||
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities. | ||
|
||
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion. | ||
|
||
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team. | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers. | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Title</title> | ||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" /> | ||
<meta name="apple-mobile-web-app-capable" content="yes" /> | ||
<meta name="handheldFriendly" content="true"> | ||
</head> | ||
|
||
<body> | ||
<div id="root"></div> | ||
</body> | ||
|
||
<script src="static/bundle.js"></script> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import React from 'react'; | ||
import { render } from 'react-dom'; | ||
|
||
import DefaultScrollbarsApp from './components/DefaultScrollbars/App'; | ||
|
||
render(<DefaultScrollbarsApp />, document.getElementById('root')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
let webpack = require('webpack'), | ||
WebpackDevServer = require('webpack-dev-server'), | ||
webpackConfig = require('./webpack.config'); | ||
|
||
new WebpackDevServer( | ||
webpack(webpackConfig), | ||
{ | ||
publicPath: webpackConfig.output.publicPath, | ||
hot: true, | ||
stats: { | ||
colors: true, | ||
}, | ||
}) | ||
.listen(3000, 'localhost', function (err) { | ||
if (err) { | ||
console.log(err); | ||
} | ||
console.log('Listening at localhost:3000'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
let path = require('path'); | ||
|
||
module.exports = { | ||
mode: "development", | ||
target: "web", | ||
devtool: 'eval', | ||
entry: ['webpack-dev-server/client?http://localhost:3000'].concat('./index'), | ||
watch: true, | ||
output: { | ||
path: path.join(__dirname, 'static'), | ||
filename: 'bundle.js', | ||
publicPath: '/static/', | ||
}, | ||
optimization: { | ||
noEmitOnErrors: true, | ||
}, | ||
resolve: { | ||
alias: { | ||
"react-scrollbar-custom": path.join(__dirname, '..', '..', 'src'), | ||
}, | ||
extensions: ['.js'], | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.js$/, | ||
exclude: /node_modules/, | ||
use: { | ||
loader: "babel-loader", | ||
options: { | ||
sourceMaps: false, | ||
comments: false, | ||
cacheDirectory: false, | ||
presets: [ | ||
"stage-0", | ||
"react", | ||
[ | ||
"env", | ||
{ | ||
"targets": { | ||
"chrome": 58, | ||
}, | ||
}, | ||
], | ||
], | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"name": "react-scrollbar-custom", | ||
"description": "The best React custom scrollbars component", | ||
"version": "0.0.1", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/xobotyi/react-scrollbars-custom.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/xobotyi/react-scrollbars-custom/issues" | ||
}, | ||
"homepage": "https://github.com/xobotyi/react-scrollbars-custom", | ||
"author": "Anton Zinovyev", | ||
"license": "MIT", | ||
"keywords": [ | ||
"scroll", | ||
"scrollbar", | ||
"scroller", | ||
"react", | ||
"react-component", | ||
"custom" | ||
], | ||
"dependencies": { | ||
"prop-types": "^15.6.2", | ||
"raf": "^3.4.0" | ||
}, | ||
"peerDependencies": { | ||
"react": "^0.14.0 || ^15.0.0 || ^16.0.0", | ||
"react-dom": "^0.14.0 || ^15.0.0 || ^16.0.0" | ||
}, | ||
"devDependencies": { | ||
"babel-cli": "^6.26.0", | ||
"babel-loader": "^7.1.4", | ||
"babel-plugin-transform-decorators-legacy": "^1.3.5", | ||
"babel-preset-env": "^1.7.0", | ||
"babel-preset-react": "^6.24.1", | ||
"babel-preset-stage-0": "^6.24.1", | ||
"path": "^0.12.7", | ||
"react": "^16.4.1", | ||
"react-dom": "^16.4.1", | ||
"webpack": "^4.14.0", | ||
"webpack-dev-server": "^3.1.4" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from 'react'; | ||
|
||
export function scroller(props) { | ||
return <div className="CustomScrollbar-view" { ...props } />; | ||
} | ||
|
||
export function trackVertical(props) { | ||
return <div className="CustomScrollbar-track CustomScrollbar-trackVertical" { ...props } />; | ||
} | ||
|
||
export function trackHorizontal(props) { | ||
return <div className="CustomScrollbar-track CustomScrollbar-trackHorizontal" { ...props } />; | ||
} | ||
|
||
export function thumbVertical(props) { | ||
return <div className="CustomScrollbar-thumb CustomScrollbar-thumbVertical" { ...props } />; | ||
} | ||
|
||
export function thumbHorizontal(props) { | ||
return <div className="CustomScrollbar-thumb CustomScrollbar-thumbHorizontal" { ...props } />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
export const wrapper = { | ||
position: 'relative', | ||
overflow: 'hidden', | ||
}; | ||
|
||
export const scroller = { | ||
position: 'absolute', | ||
top: 0, | ||
bottom: 0, | ||
left: 0, | ||
right: 0, | ||
overflow: 'scroll', | ||
}; | ||
|
||
export const trackVertical = { | ||
position: 'absolute', | ||
top: 0, | ||
right: 0, | ||
width: 8, | ||
height: '100%', | ||
}; | ||
|
||
export const trackHorizontal = { | ||
position: 'absolute', | ||
bottom: 0, | ||
left: 0, | ||
width: '100%', | ||
height: 8, | ||
}; | ||
|
||
export const thumbVertical = { | ||
position: 'relative', | ||
width: '100%', | ||
cursor: 'pointer', | ||
background: 'rgba(0,0,0,.35)', | ||
}; | ||
|
||
export const thumbHorizontal = { | ||
position: 'relative', | ||
height: '100%', | ||
cursor: 'pointer', | ||
background: 'rgba(0,0,0,.35)', | ||
}; |
Oops, something went wrong.