@sendgrid/ui-components
Advanced tools
Comparing version 1.44.10 to 1.44.11
@@ -0,1 +1,2 @@ | ||
import noop from 'lodash/noop'; | ||
import React from 'react'; | ||
@@ -5,3 +6,3 @@ import Icon from '../icon'; | ||
import cn from '../utilities/classnames'; | ||
const ColorSwatch = ({ color, current = false, onClick, removeColor, }) => { | ||
const ColorSwatch = ({ color, current = false, onClick = noop, removeColor, }) => { | ||
let swatch; | ||
@@ -8,0 +9,0 @@ return (React.createElement("article", { className: cn(Styles['color-swatch'], { |
@@ -30,3 +30,5 @@ var __rest = (this && this.__rest) || function (s, e) { | ||
if (this.state.active) { | ||
document.addEventListener('click', this.dismissDropdown, false); | ||
document.addEventListener('click', this.dismissDropdown, { | ||
capture: true, | ||
}); | ||
} | ||
@@ -37,3 +39,3 @@ }); | ||
this.setState({ active: false }); | ||
document.removeEventListener('click', this.dismissDropdown, false); | ||
document.removeEventListener('click', this.dismissDropdown); | ||
}; | ||
@@ -40,0 +42,0 @@ } |
@@ -27,3 +27,5 @@ var __rest = (this && this.__rest) || function (s, e) { | ||
if (active) { | ||
document.addEventListener('click', this.dismissDropdown, false); | ||
document.addEventListener('click', this.dismissDropdown, { | ||
capture: true, | ||
}); | ||
} | ||
@@ -35,3 +37,3 @@ return { active }; | ||
this.setState({ active: false }); | ||
document.removeEventListener('click', this.dismissDropdown, false); | ||
document.removeEventListener('click', this.dismissDropdown); | ||
}; | ||
@@ -38,0 +40,0 @@ } |
{ | ||
"name": "@sendgrid/ui-components", | ||
"version": "1.44.10", | ||
"version": "1.44.11", | ||
"description": "Reusable UI components for Sendgrid's applications.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -12,3 +12,3 @@ import React from 'react'; | ||
if (editing) { | ||
document.addEventListener('click', this.submit); | ||
document.addEventListener('click', this.submit, { capture: true }); | ||
} | ||
@@ -46,3 +46,3 @@ return { editing }; | ||
if (this.props.editing) { | ||
document.addEventListener('click', this.submit); | ||
document.addEventListener('click', this.submit, { capture: true }); | ||
} | ||
@@ -49,0 +49,0 @@ } |
@@ -83,3 +83,3 @@ var __rest = (this && this.__rest) || function (s, e) { | ||
componentDidMount() { | ||
document.addEventListener('click', this.onDocClick); | ||
document.addEventListener('click', this.onDocClick, { capture: true }); | ||
} | ||
@@ -86,0 +86,0 @@ componentWillUnmount() { |
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
980466
9394