From b130a32eaccb6f46ad90eb252291b8376435fb60 Mon Sep 17 00:00:00 2001 From: Asaad Mahmood Date: Thu, 16 Jun 2016 22:20:43 +0500 Subject: Multiple UI fixes (#3357) * Multiple UI fixes * Removing utils from tutorial file --- webapp/components/form_error.jsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'webapp/components/form_error.jsx') diff --git a/webapp/components/form_error.jsx b/webapp/components/form_error.jsx index b7d1de16a..395adfaab 100644 --- a/webapp/components/form_error.jsx +++ b/webapp/components/form_error.jsx @@ -8,6 +8,7 @@ export default class FormError extends React.Component { // accepts either a single error or an array of errors return { error: React.PropTypes.node, + noMargin: React.PropTypes.node, errors: React.PropTypes.arrayOf(React.PropTypes.node) }; } @@ -26,6 +27,7 @@ export default class FormError extends React.Component { // look for the first truthy error to display let message = this.props.error; + const noMargin = this.props.noMargin; if (!message) { for (const error of this.props.errors) { @@ -39,6 +41,16 @@ export default class FormError extends React.Component { return null; } + if (noMargin) { + return ( +
+ +
+ ); + } + return (