New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

circuitsim-component-selector

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

circuitsim-component-selector - npm Package Compare versions

Comparing version

to
0.3.0

39

dist/ComponentSelector.js

@@ -35,2 +35,4 @@ 'use strict';

var PropTypes = _reactAddons2['default'].PropTypes;
var CONFIG = {

@@ -60,20 +62,6 @@ Mouse: [{

_get(Object.getPrototypeOf(ComponentSelector.prototype), 'constructor', this).call(this, props);
this.state = {
selectedButton: {
group: 'Mouse',
button: 'Select'
}
};
this.toButtonGroups = this.toButtonGroups.bind(this);
this.buttonClicked = this.buttonClicked.bind(this);
}
_createClass(ComponentSelector, [{
key: 'buttonClicked',
value: function buttonClicked(selectedButton) {
this.setState({
selectedButton: selectedButton
});
}
}, {
key: 'toButtonGroups',

@@ -86,3 +74,3 @@ value: function toButtonGroups(buttonProps, groupName) {

theme: this.props.theme,
onClick: this.buttonClicked,
onClick: this.props.onButtonClicked,
selectedButton: selectedButton

@@ -111,5 +99,22 @@ });

ComponentSelector.propTypes = {
theme: _reactAddons2['default'].PropTypes.object.isRequired,
style: _reactAddons2['default'].PropTypes.object
theme: PropTypes.object.isRequired,
style: PropTypes.object,
selectedButton: PropTypes.shape({
group: PropTypes.string.isRequired,
button: PropTypes.string.isRequired
}),
onButtonClicked: PropTypes.func
};
ComponentSelector.defaultProps = {
selectedButton: {
selectedButton: {
group: 'Mouse',
button: 'Select'
}
},
onButtonClicked: function onButtonClicked() /* { group, button } */{}
};
module.exports = exports['default'];
{
"name": "circuitsim-component-selector",
"version": "0.2.4",
"version": "0.3.0",
"description": "Sidebar with buttons to select a circuit component.",

@@ -5,0 +5,0 @@ "main": "dist/ComponentSelector.js",