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

react-multi-email

Package Overview
Dependencies
Maintainers
2
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-multi-email - npm Package Compare versions

Comparing version 0.3.7 to 0.3.8

2

commonjs/ReactMultiEmail.d.ts

@@ -7,2 +7,4 @@ import * as React from 'react';

getLabel: (email: string, index: number, removeEmail: (index: number) => void) => void;
className?: string;
placeholder?: string | React.ReactNode;
}

@@ -9,0 +11,0 @@ export interface IReactMultiEmailState {

11

commonjs/ReactMultiEmail.js

@@ -108,7 +108,8 @@ "use strict";

var _a = this.state, focused = _a.focused, emails = _a.emails, inputValue = _a.inputValue;
var _b = this.props, style = _b.style, getLabel = _b.getLabel;
var _b = this.props, style = _b.style, getLabel = _b.getLabel, _c = _b.className, className = _c === void 0 ? '' : _c, placeholder = _b.placeholder;
// removeEmail
return (React.createElement("div", { className: 'react-multi-email ' + (focused ? 'focused' : ''), style: style, onClick: function (e) {
return (React.createElement("div", { className: className + " react-multi-email " + (focused ? 'focused' : '') + " " + (inputValue === '' && emails.length === 0 ? 'empty' : ''), style: style, onClick: function () {
_this.emailInput.focus();
} },
placeholder ? React.createElement("span", { "data-placeholder": true }, placeholder) : null,
emails.map(function (email, index) {

@@ -121,3 +122,7 @@ return getLabel(email, index, _this.removeEmail);

}
}, type: "text", value: inputValue, onFocus: function (e) { return _this.setState({ focused: true }); }, onBlur: function (e) {
}, type: "text", value: inputValue, onFocus: function () {
return _this.setState({
focused: true,
});
}, onBlur: function (e) {
_this.setState({ focused: false });

@@ -124,0 +129,0 @@ _this.findEmailAddress(e.target.value, true);

@@ -7,2 +7,4 @@ import * as React from 'react';

getLabel: (email: string, index: number, removeEmail: (index: number) => void) => void;
className?: string;
placeholder?: string | React.ReactNode;
}

@@ -9,0 +11,0 @@ export interface IReactMultiEmailState {

@@ -93,7 +93,8 @@ import * as React from 'react';

const { focused, emails, inputValue } = this.state;
const { style, getLabel } = this.props;
const { style, getLabel, className = '', placeholder } = this.props;
// removeEmail
return (React.createElement("div", { className: 'react-multi-email ' + (focused ? 'focused' : ''), style: style, onClick: (e) => {
return (React.createElement("div", { className: `${className} react-multi-email ${focused ? 'focused' : ''} ${inputValue === '' && emails.length === 0 ? 'empty' : ''}`, style: style, onClick: () => {
this.emailInput.focus();
} },
placeholder ? React.createElement("span", { "data-placeholder": true }, placeholder) : null,
emails.map((email, index) => getLabel(email, index, this.removeEmail)),

@@ -104,3 +105,5 @@ React.createElement("input", { ref: ref => {

}
}, type: "text", value: inputValue, onFocus: (e) => this.setState({ focused: true }), onBlur: (e) => {
}, type: "text", value: inputValue, onFocus: () => this.setState({
focused: true,
}), onBlur: (e) => {
this.setState({ focused: false });

@@ -107,0 +110,0 @@ this.findEmailAddress(e.target.value, true);

{
"name": "react-multi-email",
"version": "0.3.7",
"version": "0.3.8",
"description": "React multi email input",
"jsnext:main": "es6/index.js",
"main": "commonjs/index.js",
"repository": "https://github.com/axui/react-multi-email",
"repository": "https://github.com/jsdevkr/react-multi-email",
"author": "tom@axisj.com",

@@ -9,0 +9,0 @@ "license": "MIT",

@@ -43,2 +43,3 @@ # react-multi-email

<ReactMultiEmail
placeholder='placeholder'
emails={emails}

@@ -45,0 +46,0 @@ onChange={(_emails: string[]) => {

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