react-bootstrap-toggle
Advanced tools
Comparing version 2.0.4 to 2.0.5
{ | ||
"name": "react-bootstrap-toggle", | ||
"version": "2.0.4", | ||
"version": "2.0.5", | ||
"description": "A React version of the bootstrap-toggle without the JQuery dependency", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
@@ -77,3 +77,3 @@ ## React-Bootstrap-Toggle | ||
offstyle|string|"default"|Style of the off toggle. Possible values are `default`, `primary`, `success`, `info`, `warning`, `danger` | ||
handlestyle|string|"default"|Style of the off toggle. Possible values are `default`, `primary`, `success`, `info`, `warning`, `danger` | ||
handlestyle|string|"default"|Style of the handle. Possible values are `default`, `primary`, `success`, `info`, `warning`, `danger` | ||
width|integer|*null*|Sets the width of the toggle. if set to *null*, width will be responsive. | ||
@@ -80,0 +80,0 @@ height|integer|*null*|Sets the height of the toggle. if set to *null*, height will be responsive. |
@@ -27,2 +27,4 @@ import React, { Component, PropTypes } from 'react'; | ||
onClick: PropTypes.func, | ||
id: PropTypes.string, | ||
className: PropTypes.string, | ||
} | ||
@@ -112,2 +114,3 @@ | ||
let style = {}; | ||
let className = this.props.active ? activeClass : inactiveClass; | ||
if (this.props.width && this.props.height) { | ||
@@ -124,2 +127,7 @@ style = { | ||
} | ||
if (this.props.className) { | ||
className += ` ${this.props.className}`; | ||
} | ||
return ( | ||
@@ -129,4 +137,5 @@ // eslint-disable-next-line jsx-a11y/no-static-element-interactions | ||
role="button" | ||
id={this.props.id} | ||
disabled={this.props.disabled} | ||
className={this.props.active ? activeClass : inactiveClass} | ||
className={className} | ||
onClick={this.onClick} | ||
@@ -133,0 +142,0 @@ style={style} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37450
898