🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

react-button-group

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-button-group - npm Package Compare versions

Comparing version

to
1.0.0

build-style.config.js

44

package.json
{
"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