react-dropdown
Advanced tools
Comparing version 0.5.1 to 0.6.1
@@ -138,2 +138,6 @@ "use strict"; | ||
value: function render() { | ||
var _props = this.props; | ||
var controlClassName = _props.controlClassName; | ||
var menuClassName = _props.menuClassName; | ||
var value = React.createElement( | ||
@@ -146,3 +150,3 @@ "div", | ||
"div", | ||
{ className: "Dropdown-menu" }, | ||
{ className: menuClassName }, | ||
this.buildMenu() | ||
@@ -161,3 +165,3 @@ ) : null; | ||
"div", | ||
{ className: "Dropdown-control", onMouseDown: this.handleMouseDown.bind(this), onTouchEnd: this.handleMouseDown.bind(this) }, | ||
{ className: controlClassName, onMouseDown: this.handleMouseDown.bind(this), onTouchEnd: this.handleMouseDown.bind(this) }, | ||
value, | ||
@@ -175,3 +179,4 @@ React.createElement("span", { className: "Dropdown-arrow" }) | ||
Dropdown.defaultProps = { controlClassName: "Dropdown-control", menuClassName: "Dropdown-menu" }; | ||
module.exports = Dropdown; | ||
@@ -98,4 +98,5 @@ 'use strict'; | ||
render() { | ||
const { controlClassName, menuClassName } = this.props; | ||
let value = (<div className='placeholder'>{this.state.selected.label}</div>); | ||
let menu = this.state.isOpen ? <div className='Dropdown-menu'>{this.buildMenu()}</div> : null; | ||
let menu = this.state.isOpen ? <div className={menuClassName}>{this.buildMenu()}</div> : null; | ||
@@ -109,3 +110,3 @@ let dropdownClass = classNames({ | ||
<div className={dropdownClass}> | ||
<div className='Dropdown-control' onMouseDown={this.handleMouseDown.bind(this)} onTouchEnd={this.handleMouseDown.bind(this)}> | ||
<div className={controlClassName} onMouseDown={this.handleMouseDown.bind(this)} onTouchEnd={this.handleMouseDown.bind(this)}> | ||
{value} | ||
@@ -120,3 +121,3 @@ <span className='Dropdown-arrow' /> | ||
} | ||
Dropdown.defaultProps = { controlClassName: 'Dropdown-control', menuClassName: 'Dropdown-menu'}; | ||
export default Dropdown; |
{ | ||
"name": "react-dropdown", | ||
"version": "0.5.1", | ||
"version": "0.6.1", | ||
"description": "React dropdown component", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
21232
558