Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@the-control-group/ui

Package Overview
Dependencies
Maintainers
7
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@the-control-group/ui - npm Package Compare versions

Comparing version 1.7.3 to 1.7.5

12

lib/elements/Button/Button.js

@@ -21,5 +21,7 @@ /**

secondary,
tertiary,
plain,
...other
}) => {
const style = outline ? 'outline' : bare ? 'bare' : 'standard';
const style = outline ? 'outline' : bare ? 'bare' : plain ? '' : 'standard';

@@ -29,3 +31,3 @@ const combinedClasses = classNames(

other.classes,
secondary ? 'secondary' : 'primary',
secondary ? 'secondary' : tertiary ? 'tertiary' : plain ? '' : 'primary',
style,

@@ -69,5 +71,9 @@ mini && 'mini',

/** Secondary button styles */
secondary: PropTypes.bool
secondary: PropTypes.bool,
/** Tertiary button styles */
tertiary: PropTypes.bool,
/* No styles */
plain: PropTypes.bool
};
export default Button;

@@ -66,3 +66,3 @@ /**

Object.keys(options).map((keyName, keyIndex) =>
<option key={keyIndex} value={keyName}>{options[keyName]}</option>
<option key={keyIndex} value={keyName} disabled={keyName.includes('disabled')}>{options[keyName]}</option>
)

@@ -69,0 +69,0 @@ )}

@@ -32,3 +32,5 @@ /**

this.state = {
percentage: 0
percentage: 0,
pressedKKey: false,
pressedControlKey: false
};

@@ -40,2 +42,4 @@

this.startSegmentBar = this.startSegmentBar.bind(this);
this.skipProgressBar = this.skipProgressBar.bind(this);
this.handleKeyDown = this.handleKeyDown.bind(this);
this.interval = null;

@@ -48,2 +52,4 @@ }

}
window.addEventListener('keydown', this.handleKeyDown);
}

@@ -53,2 +59,3 @@

clearInterval(this.interval);
window.removeEventListener('keydown', this.handleKeyDown);
}

@@ -117,2 +124,27 @@

handleKeyDown(event) {
if(event.key === 'Control') {
this.setState({
pressedControlKey: true
}, this.skipProgressBar);
}
if(event.key === 'k') {
this.setState({
pressedKKey: true
}, this.skipProgressBar);
}
}
skipProgressBar() {
if(this.state.pressedKKey && this.state.pressedControlKey) {
this.setState({
percentage: 100
}, () => {
clearInterval(this.interval);
setTimeout(this.props.onComplete, this.props.completeDelay);
});
}
}
render() {

@@ -119,0 +151,0 @@ return (

{
"name": "@the-control-group/ui",
"version": "1.7.2",
"version": "1.7.3",
"version": "1.7.5",
"description": "UI kit based on ReactJS for TCG projects",

@@ -6,0 +5,0 @@ "main": "lib/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc