@eventespresso/react-exit-modal-typeform
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -70,3 +70,3 @@ import _Object$getPrototypeOf from 'babel-runtime/core-js/object/get-prototype-of'; | ||
var content = this.state.initialView ? wp.element.createElement(ExitModalOptions, { | ||
var content = this.state.initialView ? React.createElement(ExitModalOptions, { | ||
onClose: function onClose() { | ||
@@ -78,4 +78,6 @@ return _this2.handleCloseModal(); | ||
}, | ||
introText: this.props.introText | ||
}) : wp.element.createElement(TypeFormEmbed, { | ||
introText: this.props.introText, | ||
doSurveyButtonText: this.props.doSurveyButtonText, | ||
skipButtonText: this.props.skipButtonText | ||
}) : React.createElement(TypeFormEmbed, { | ||
onSubmit: function onSubmit() { | ||
@@ -87,3 +89,3 @@ return _this2.handleCloseModal(); | ||
}); | ||
return wp.element.createElement( | ||
return React.createElement( | ||
'div', | ||
@@ -93,3 +95,3 @@ { ref: function ref(el) { | ||
} }, | ||
wp.element.createElement( | ||
React.createElement( | ||
ReactModal, | ||
@@ -96,0 +98,0 @@ { |
@@ -11,3 +11,3 @@ /** | ||
return wp.element.createElement( | ||
return React.createElement( | ||
'button', | ||
@@ -14,0 +14,0 @@ { className: buttonClass, onClick: handleOnClick }, |
@@ -15,6 +15,6 @@ /** | ||
var buttonClass = "ee-saas-cancel-prompt-button"; | ||
return wp.element.createElement( | ||
return React.createElement( | ||
'div', | ||
{ className: 'exit-modal-choices' }, | ||
wp.element.createElement( | ||
React.createElement( | ||
'p', | ||
@@ -24,3 +24,3 @@ null, | ||
), | ||
wp.element.createElement(Button, { | ||
React.createElement(Button, { | ||
key: 'do survey', | ||
@@ -31,3 +31,3 @@ handleOnClick: onDoSurvey, | ||
}), | ||
wp.element.createElement(Button, { | ||
React.createElement(Button, { | ||
key: 'close-modal-and-cancel', | ||
@@ -34,0 +34,0 @@ handleOnClick: onClose, |
@@ -59,3 +59,3 @@ import _Object$getPrototypeOf from 'babel-runtime/core-js/object/get-prototype-of'; | ||
return wp.element.createElement('div', { className: 'react-typeform-embed', ref: function ref(tf) { | ||
return React.createElement('div', { className: 'react-typeform-embed', ref: function ref(tf) { | ||
return _this2.typeformEl = tf; | ||
@@ -62,0 +62,0 @@ }, style: this.props.style }); |
@@ -103,3 +103,3 @@ 'use strict'; | ||
var content = this.state.initialView ? wp.element.createElement(_index.ExitModalOptions, { | ||
var content = this.state.initialView ? _react2.default.createElement(_index.ExitModalOptions, { | ||
onClose: function onClose() { | ||
@@ -111,4 +111,6 @@ return _this2.handleCloseModal(); | ||
}, | ||
introText: this.props.introText | ||
}) : wp.element.createElement(_index.TypeFormEmbed, { | ||
introText: this.props.introText, | ||
doSurveyButtonText: this.props.doSurveyButtonText, | ||
skipButtonText: this.props.skipButtonText | ||
}) : _react2.default.createElement(_index.TypeFormEmbed, { | ||
onSubmit: function onSubmit() { | ||
@@ -120,3 +122,3 @@ return _this2.handleCloseModal(); | ||
}); | ||
return wp.element.createElement( | ||
return _react2.default.createElement( | ||
'div', | ||
@@ -126,3 +128,3 @@ { ref: function ref(el) { | ||
} }, | ||
wp.element.createElement( | ||
_react2.default.createElement( | ||
_reactModal2.default, | ||
@@ -129,0 +131,0 @@ { |
@@ -19,3 +19,3 @@ 'use strict'; | ||
return wp.element.createElement( | ||
return _react2.default.createElement( | ||
'button', | ||
@@ -22,0 +22,0 @@ { className: buttonClass, onClick: handleOnClick }, |
@@ -29,6 +29,6 @@ 'use strict'; | ||
var buttonClass = "ee-saas-cancel-prompt-button"; | ||
return wp.element.createElement( | ||
return _react2.default.createElement( | ||
'div', | ||
{ className: 'exit-modal-choices' }, | ||
wp.element.createElement( | ||
_react2.default.createElement( | ||
'p', | ||
@@ -38,3 +38,3 @@ null, | ||
), | ||
wp.element.createElement(_button2.default, { | ||
_react2.default.createElement(_button2.default, { | ||
key: 'do survey', | ||
@@ -45,3 +45,3 @@ handleOnClick: onDoSurvey, | ||
}), | ||
wp.element.createElement(_button2.default, { | ||
_react2.default.createElement(_button2.default, { | ||
key: 'close-modal-and-cancel', | ||
@@ -48,0 +48,0 @@ handleOnClick: onClose, |
@@ -88,3 +88,3 @@ 'use strict'; | ||
return wp.element.createElement('div', { className: 'react-typeform-embed', ref: function ref(tf) { | ||
return _react2.default.createElement('div', { className: 'react-typeform-embed', ref: function ref(tf) { | ||
return _this2.typeformEl = tf; | ||
@@ -91,0 +91,0 @@ }, style: this.props.style }); |
{ | ||
"name": "@eventespresso/react-exit-modal-typeform", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "React component that allows the triggering of an typeform form via modal", | ||
@@ -10,3 +10,4 @@ "author": "EventEspresso", | ||
"modal", | ||
"exit-survery" | ||
"exit-survey", | ||
"survey" | ||
], | ||
@@ -27,4 +28,10 @@ "homepage": "https://github.com/eventespresso/packages/tree/master/packages/exit-modal-typeform/README.md", | ||
"devDependencies": { | ||
"@wordpress/babel-preset-default": "^1.1.2", | ||
"babel-core": "^6.26.0" | ||
"babel-core": "^6.26.0", | ||
"babel-loader": "^7.1.2", | ||
"babel-plugin-transform-object-rest-spread": "^6.26.0", | ||
"babel-plugin-transform-react-jsx": "^6.24.1", | ||
"babel-polyfill": "^6.26.0", | ||
"babel-preset-env": "^1.6.1", | ||
"css-loader": "^0.28.9", | ||
"style-loader": "^0.20.1" | ||
}, | ||
@@ -31,0 +38,0 @@ "dependencies": { |
@@ -55,2 +55,4 @@ /** | ||
introText={this.props.introText} | ||
doSurveyButtonText={this.props.doSurveyButtonText} | ||
skipButtonText={this.props.skipButtonText} | ||
/> | ||
@@ -57,0 +59,0 @@ : <TypeFormEmbed |
34052
842
8