react-button-group
Advanced tools
Comparing version
{ | ||
"name": "react-button-group", | ||
"version": "0.1.0", | ||
"version": "1.0.0", | ||
"description": "React Button Group", | ||
"main": "lib/index.js", | ||
"scripts": { | ||
"test": "make" | ||
"test": "make", | ||
"lib": "./node_modules/.bin/gulp", | ||
"build-style": "./node_modules/.bin/webpack --progress --colors --config build-style.config.js", | ||
"dist": "./node_modules/.bin/webpack --progress --colors --config dist.config.js", | ||
"dist.min": "./node_modules/.bin/webpack --progress --colors --optimize-minimize --optimize-occurence-order --optimize-dedupe --config dist.min.config.js", | ||
"build": "npm run lib && npm run dist && npm run dist.min", | ||
"serve": "./node_modules/.bin/http-server -p 9091", | ||
"dev": "./node_modules/.bin/webpack-dev-server --progress --colors --port 9090 --content-base http://localhost:9091" | ||
}, | ||
"devDependencies": { | ||
"css-loader": "^0.9.0", | ||
"extract-text-webpack-plugin": "^0.3.5", | ||
"gulp": "^3.8.11", | ||
"gulp-react": "^2.0.0", | ||
"http-server": "^0.7.3", | ||
"jsx-loader": "^0.12.2", | ||
"style-loader": "^0.8.2", | ||
"stylus-loader": "^0.4.0", | ||
"webpack": "^1.4.13", | ||
"webpack-dev-server": "^1.6.6" | ||
}, | ||
"dependencies": { | ||
"object-assign": "^2.0.0", | ||
"react": "^0.13.1", | ||
"react-button": "^1.2.1", | ||
"react-clonewithprops": "^1.0.1", | ||
"react-dropdown-button": "^1.0.10", | ||
"react-split-button": "^1.0.0", | ||
"react-style-normalizer": "^1.2.6" | ||
}, | ||
"peerDependencies": { | ||
"react": ">=0.12.0" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/radubrehar/react-button-group.git" | ||
"url": "https://github.com/zippyui/react-button-group.git" | ||
}, | ||
@@ -21,8 +52,9 @@ "keywords": [ | ||
], | ||
"author": "Radu Brehar", | ||
"author": "ZippyUI <contact@zippyui.com>", | ||
"contributors": [], | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/radubrehar/react-button-group/issues" | ||
"url": "https://github.com/zippyui/react-button-group/issues" | ||
}, | ||
"homepage": "https://github.com/radubrehar/react-button-group" | ||
"homepage": "https://github.com/zippyui/react-button-group" | ||
} |
# react-button-group | ||
React Button Group | ||
> A carefully crafted button-group for React | ||
<img src="./button-group.png" height="60" width="315"/> | ||
## Install | ||
```sh | ||
$ npm install react-button-group --save | ||
``` | ||
## Usage | ||
If you want to change the border for the buttons in the group, just specify `style.border` | ||
Example | ||
```jsx | ||
var Group = require('react-button-group') | ||
<Group style={{border: '2px solid red', borderRadius: 2}}> | ||
<Group.Button>Hello</Group.Button> | ||
<Group.Button>world</Group.Button> | ||
</Group> | ||
``` | ||
The module also exports those properties: | ||
* Button | ||
* SplitButton | ||
* DropDownButton | ||
So you can include any of those in a group. | ||
## Properties | ||
* keepOnePressed: Boolean | ||
* pressedIndex: Number | ||
* defaultPressedIndex: Number | ||
* onToggle: Function(pressed, index) - Called when a button has been pressed. Called with 2 args: pressed boolean value and the index of the button in the group. | ||
* commonStyle: Object - styles to be applied to all buttons in the group | ||
* manageRadius: Boolean | ||
* manageBorder: Boolean | ||
## Changelog | ||
See [changelog](./CHANGELOG.md) | ||
## Contributing | ||
Use [Github issues](https://github.com/zippyui/react-button-group/issues) for feature requests and bug reports. | ||
We actively welcome pull requests. | ||
For setting up the project locally, use: | ||
```sh | ||
$ git clone https://github.com/zippyui/react-button-group | ||
$ cd react-button-group | ||
$ npm install | ||
$ npm serve # to start http server | ||
$ npm dev * to start webpack-dev-server | ||
``` | ||
Now navigate to [localhost:9091](http://localhost:9091/) | ||
Before building a new version, make sure you run | ||
```sh | ||
$ npm run build | ||
``` | ||
which compiles the `src` folder (which contains jsx files) into the `lib` folder (only valid EcmaScript 5 files). | ||
## License | ||
#### MIT |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
413273
17938.98%19
375%10063
Infinity%79
2533.33%8
Infinity%10
Infinity%5
400%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added