react-survey
Advanced tools
Comparing version 1.0.10 to 1.0.11
@@ -31,2 +31,8 @@ "use strict"; | ||
// TODO send survey id to enable multiple surveys on the same site | ||
// TODO allow deactivation of localstorage (this can be done on the server) | ||
// TODO clean first level props structure (no `data`) | ||
// TODO allow styles overwrite | ||
// TODO make radio/checkbox text clickable | ||
var ReactSurvey = function (_Component) { | ||
@@ -168,3 +174,3 @@ _inherits(ReactSurvey, _Component); | ||
value: function closeSurvey() { | ||
document.getElementById("rs-parent").style = _styles.styles.hiddenStyle; | ||
document.getElementById("rs-parent").style.display = _styles.styles.hiddenStyle.display; | ||
localStorage.setItem("surveyDone", "true"); | ||
@@ -274,7 +280,7 @@ } | ||
}, | ||
freeSpeech ? _react2.default.createElement("textarea", { onClick: function onClick(e) { | ||
freeSpeech ? _react2.default.createElement("textarea", { onChange: function onChange(e) { | ||
return comment = e.target.value; | ||
} }) : "", | ||
email ? _react2.default.createElement("input", { | ||
onClick: function onClick(e) { | ||
onChange: function onChange(e) { | ||
return userEmail = e.target.value; | ||
@@ -281,0 +287,0 @@ }, |
{ | ||
"name": "react-survey", | ||
"version": "1.0.10", | ||
"version": "1.0.11", | ||
"description": "A small but powerful component to make unobstrusive survey pup-up", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -5,2 +5,8 @@ import React, { Component } from "react"; | ||
// TODO send survey id to enable multiple surveys on the same site | ||
// TODO allow deactivation of localstorage (this can be done on the server) | ||
// TODO clean first level props structure (no `data`) | ||
// TODO allow styles overwrite | ||
// TODO make radio/checkbox text clickable | ||
class ReactSurvey extends Component { | ||
@@ -125,3 +131,4 @@ constructor(props) { | ||
closeSurvey() { | ||
document.getElementById("rs-parent").style = styles.hiddenStyle; | ||
document.getElementById("rs-parent").style.display = | ||
styles.hiddenStyle.display; | ||
localStorage.setItem("surveyDone", "true"); | ||
@@ -208,7 +215,7 @@ } | ||
{freeSpeech | ||
? <textarea onClick={e => (comment = e.target.value)} /> | ||
? <textarea onChange={e => (comment = e.target.value)} /> | ||
: ""} | ||
? <input | ||
onClick={e => (userEmail = e.target.value)} | ||
onChange={e => (userEmail = e.target.value)} | ||
placeholder="email" | ||
@@ -215,0 +222,0 @@ /> |
97892
776