Skip to content

Commit

Permalink
Make help row class name consistent when inline or not [#153568314]
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Berney <jberney@pivotal.io>
  • Loading branch information
Ming Xiao authored and Jonathan Berney committed Dec 11, 2017
1 parent 705ffd2 commit 454e248
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/react/forms/form-unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ export class FormUnit extends React.Component {
);

const fieldRow = field && (inline ? field : <div className="field-row" key="field-row">{field}</div>);
const helpRow = hideHelpRow || ( inline ? help :
<div className={classnames('help-row', {'type-dark-5': !hasError})} key="help-row">{help}</div>);
const helpRowClassName = classnames('help-row', {'type-dark-5': !hasError});
const helpRow = hideHelpRow || (inline ? help :
<div className={helpRowClassName} key="help-row">{help}</div>);

const sections = labelPosition === 'after' ? [fieldRow, labelRow] : [labelRow, fieldRow];

Expand All @@ -88,7 +89,7 @@ export class FormUnit extends React.Component {
}}>{col}</FlexCol>)}
</Grid>,
<Grid key="bottom">
<FlexCol className="help-row">
<FlexCol className={helpRowClassName}>
{helpRow}
</FlexCol>
</Grid>]
Expand Down

0 comments on commit 454e248

Please sign in to comment.