From 31b0bcaa673794024a71065be76681150ad4b9d6 Mon Sep 17 00:00:00 2001 From: Tayane Fernandes Date: Tue, 7 Feb 2017 18:51:08 -0200 Subject: [#922] Extract input field to a component with @anikarni --- web-ui/src/common/submit_button/submit_button.js | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 web-ui/src/common/submit_button/submit_button.js (limited to 'web-ui/src/common/submit_button/submit_button.js') diff --git a/web-ui/src/common/submit_button/submit_button.js b/web-ui/src/common/submit_button/submit_button.js new file mode 100644 index 00000000..89cfc55b --- /dev/null +++ b/web-ui/src/common/submit_button/submit_button.js @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2017 ThoughtWorks, Inc. + * + * Pixelated is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pixelated is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Pixelated. If not, see . + */ + +import React from 'react' + +import './submit-button.scss' + +const SubmitButton = ({ buttonText }) => ( + +) + +export default SubmitButton -- cgit v1.2.3 From 7f76c79319bf0817222fc88011fd870d97648963 Mon Sep 17 00:00:00 2001 From: Anike Arni Date: Tue, 7 Feb 2017 19:46:45 -0200 Subject: [#922] Adds eslint for react and es6 files --- web-ui/src/common/submit_button/submit_button.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'web-ui/src/common/submit_button/submit_button.js') diff --git a/web-ui/src/common/submit_button/submit_button.js b/web-ui/src/common/submit_button/submit_button.js index 89cfc55b..ea1bbf26 100644 --- a/web-ui/src/common/submit_button/submit_button.js +++ b/web-ui/src/common/submit_button/submit_button.js @@ -23,4 +23,8 @@ const SubmitButton = ({ buttonText }) => ( ) +SubmitButton.propTypes = { + buttonText: React.PropTypes.string.isRequired +} + export default SubmitButton -- cgit v1.2.3 From 94fc7554995e4b6fcd95e74d082ed411239ea8e9 Mon Sep 17 00:00:00 2001 From: Anike Arni Date: Wed, 8 Feb 2017 11:11:38 -0200 Subject: [#922] Add semincolon to lint and fix js code with @tayanefernandes --- web-ui/src/common/submit_button/submit_button.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'web-ui/src/common/submit_button/submit_button.js') diff --git a/web-ui/src/common/submit_button/submit_button.js b/web-ui/src/common/submit_button/submit_button.js index ea1bbf26..fb87bf7d 100644 --- a/web-ui/src/common/submit_button/submit_button.js +++ b/web-ui/src/common/submit_button/submit_button.js @@ -15,16 +15,16 @@ * along with Pixelated. If not, see . */ -import React from 'react' +import React from 'react'; -import './submit-button.scss' +import './submit-button.scss'; const SubmitButton = ({ buttonText }) => ( -) +); SubmitButton.propTypes = { buttonText: React.PropTypes.string.isRequired -} +}; -export default SubmitButton +export default SubmitButton; -- cgit v1.2.3 From db8ded2876a981b259f2ccfc5b07133e6eec666b Mon Sep 17 00:00:00 2001 From: Anike Arni Date: Thu, 23 Feb 2017 17:01:58 -0300 Subject: [#907] Normalizes scss file names with @thaissiqueira --- web-ui/src/common/submit_button/submit_button.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web-ui/src/common/submit_button/submit_button.js') diff --git a/web-ui/src/common/submit_button/submit_button.js b/web-ui/src/common/submit_button/submit_button.js index fb87bf7d..4754e042 100644 --- a/web-ui/src/common/submit_button/submit_button.js +++ b/web-ui/src/common/submit_button/submit_button.js @@ -17,7 +17,7 @@ import React from 'react'; -import './submit-button.scss'; +import './submit_button.scss'; const SubmitButton = ({ buttonText }) => ( -- cgit v1.2.3 From aad05a38511a8bdd9bd13d2d38092ce6b35ac46b Mon Sep 17 00:00:00 2001 From: Tayane Fernandes Date: Thu, 9 Mar 2017 18:54:10 -0300 Subject: [#923] Disable button when the email is invalid on the backup email page with @FrailWords --- web-ui/src/common/submit_button/submit_button.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'web-ui/src/common/submit_button/submit_button.js') diff --git a/web-ui/src/common/submit_button/submit_button.js b/web-ui/src/common/submit_button/submit_button.js index 4754e042..1e7da021 100644 --- a/web-ui/src/common/submit_button/submit_button.js +++ b/web-ui/src/common/submit_button/submit_button.js @@ -16,15 +16,23 @@ */ import React from 'react'; +import RaisedButton from 'material-ui/RaisedButton'; import './submit_button.scss'; -const SubmitButton = ({ buttonText }) => ( - +const SubmitButton = ({ buttonText, disabled }) => ( +
+ +
); SubmitButton.propTypes = { - buttonText: React.PropTypes.string.isRequired + buttonText: React.PropTypes.string.isRequired, + disabled: React.PropTypes.boolean +}; + +SubmitButton.defaultProps = { + disabled: true }; export default SubmitButton; -- cgit v1.2.3 From 29a59d4ec216a895c8004fc0addbec1b329df200 Mon Sep 17 00:00:00 2001 From: Tayane Fernandes Date: Fri, 10 Mar 2017 14:29:27 -0300 Subject: [#923] Fix submit button style of material-ui with @FrailWords --- web-ui/src/common/submit_button/submit_button.js | 26 ++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'web-ui/src/common/submit_button/submit_button.js') diff --git a/web-ui/src/common/submit_button/submit_button.js b/web-ui/src/common/submit_button/submit_button.js index 1e7da021..73f9b21c 100644 --- a/web-ui/src/common/submit_button/submit_button.js +++ b/web-ui/src/common/submit_button/submit_button.js @@ -20,19 +20,37 @@ import RaisedButton from 'material-ui/RaisedButton'; import './submit_button.scss'; -const SubmitButton = ({ buttonText, disabled }) => ( +const labelStyle = { + textTransform: 'none', + fontSize: '1em', + lineHeight: '48px' +}; + +const buttonStyle = { + height: '48px' +}; + +const SubmitButton = ({ buttonText, disabled=false }) => (
- +
); SubmitButton.propTypes = { buttonText: React.PropTypes.string.isRequired, - disabled: React.PropTypes.boolean + disabled: React.PropTypes.bool }; SubmitButton.defaultProps = { - disabled: true + disabled: false }; export default SubmitButton; -- cgit v1.2.3 From 9e5dce775c51b44cf7b17d8ab564fdefc16a06c0 Mon Sep 17 00:00:00 2001 From: Tayane Fernandes Date: Fri, 10 Mar 2017 15:25:43 -0300 Subject: [#923] Fix the submit button when the email is empty When the email is empty the button should be disabled, but we should not see any error message with @FrailWords --- web-ui/src/common/submit_button/submit_button.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'web-ui/src/common/submit_button/submit_button.js') diff --git a/web-ui/src/common/submit_button/submit_button.js b/web-ui/src/common/submit_button/submit_button.js index 73f9b21c..1224c7bd 100644 --- a/web-ui/src/common/submit_button/submit_button.js +++ b/web-ui/src/common/submit_button/submit_button.js @@ -30,9 +30,10 @@ const buttonStyle = { height: '48px' }; -const SubmitButton = ({ buttonText, disabled=false }) => ( +const SubmitButton = ({ buttonText, disabled = false }) => (
-