react-bootstrap-slider
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -106,5 +106,12 @@ (function (global, factory) { | ||
var that = this; | ||
this.mySlider = new _bootstrapSlider2.default(_reactDom2.default.findDOMNode(this), { | ||
var sliderAttributes = { | ||
"tooltip": this.props.tooltip || "show" | ||
}); | ||
}; | ||
if (this.props.orientation) { | ||
console.log("orientation = " + this.props.orientation); | ||
sliderAttributes.orientation = this.props.orientation; | ||
} | ||
this.mySlider = new _bootstrapSlider2.default(_reactDom2.default.findDOMNode(this), sliderAttributes); | ||
this.updateSliderValues(); | ||
@@ -111,0 +118,0 @@ this.mySlider.on("change", function (e) { |
{ | ||
"name": "react-bootstrap-slider", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Bootstrap Slider component for React", | ||
@@ -10,3 +10,4 @@ "scripts": { | ||
"buildDemo": "npm run build && webpack", | ||
"prepublish": "npm run build" | ||
"prepublish": "npm run build", | ||
"postinstall": "npm run buildDemo" | ||
}, | ||
@@ -45,2 +46,5 @@ "main": "dist/react-bootstrap-slider.js", | ||
"babel-preset-react": "^6.5.0", | ||
"eslint": "^2.11.1", | ||
"eslint-config-eslint": "^3.0.0", | ||
"eslint-plugin-react": "^5.1.1", | ||
"path": "^0.12.7", | ||
@@ -47,0 +51,0 @@ "webpack": "^1.12.14", |
@@ -37,2 +37,3 @@ # React Bootstrap Slider | ||
min={this.state.min} | ||
orientation="vertical" | ||
disabled="disabled" /> | ||
@@ -46,3 +47,5 @@ } | ||
The default **orientation** value is 'horizontal', so you only need to include that prop if you want to set it to 'vertical' | ||
##Development | ||
@@ -65,4 +68,15 @@ To develop, issue this command: | ||
Wepback will build the JavaScript files for the demo in the /demo/js/ folder. Demo code will go in the slider-bundle.min.js file. Any 3rd-party code (jQuery, Bootstrap and the react-bootstrap-slider itself) goes into the vendor.min.js file. Source maps are generated both. | ||
Webpack will build the JavaScript files for the demo in the /demo/js/ folder. Demo code will go in the slider-bundle.min.js file. Any 3rd-party code (jQuery, Bootstrap and the react-bootstrap-slider itself) goes into the vendor.min.js file. Source maps are generated both. | ||
@@ -18,2 +18,7 @@ /* eslint-env browser */ | ||
}; | ||
if (this.props.orientation) { | ||
console.log("Demo orientation = " + this.props.orientation); | ||
this.state.orientation = this.props.orientation; | ||
} | ||
es6BindAll(this, ["changeValue", "changeAxes"]); | ||
@@ -41,3 +46,4 @@ } | ||
max = { this.state.max } | ||
min = { this.state.min } /> | ||
min = { this.state.min } | ||
orientation = {this.state.orientation || undefined} /> | ||
<br /> <br /> | ||
@@ -53,6 +59,5 @@ Value: { newValue } | ||
ReactDOM.render(<Demo polyfill = { false } | ||
startValue = { 3000 } | ||
ReactDOM.render(<Demo startValue = { 3000 } | ||
max = { 20000 } | ||
min = { 1000 } | ||
step = { 1000 } />, document.getElementById("main")); |
@@ -21,5 +21,12 @@ /* eslint-env browser */ | ||
var that = this; | ||
this.mySlider = new Slider(ReactDOM.findDOMNode(this), { | ||
var sliderAttributes = { | ||
"tooltip": this.props.tooltip || "show" | ||
}); | ||
}; | ||
if (this.props.orientation) { | ||
console.log("orientation = " + this.props.orientation); | ||
sliderAttributes.orientation = this.props.orientation; | ||
} | ||
this.mySlider = new Slider(ReactDOM.findDOMNode(this), sliderAttributes); | ||
this.updateSliderValues(); | ||
@@ -26,0 +33,0 @@ this.mySlider.on("change", function(e) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
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
80
253322
13
16
433
1
1