Skip to content

Commit

Permalink
fix(helper-text): update PR after downshift updates
Browse files Browse the repository at this point in the history
  • Loading branch information
tw15egan committed May 12, 2020
1 parent 404a9bf commit 4346f81
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions packages/react/src/components/ComboBox/ComboBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,11 +338,6 @@ export default class ComboBox extends React.Component {
{titleText}
</label>
)}
{helperText && (
<div id={comboBoxHelperId} className={helperClasses}>
{helperText}
</div>
)}
<ListBox
className={className}
disabled={disabled}
Expand Down Expand Up @@ -431,6 +426,11 @@ export default class ComboBox extends React.Component {
</ListBox.Menu>
)}
</ListBox>
{helperText && !invalid && (
<div id={comboBoxHelperId} className={helperClasses}>
{helperText}
</div>
)}
</div>
)}
</Downshift>
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/Dropdown/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ function Dropdown({
{titleText}
</label>
)}
{!inline && helper}
<ListBox
aria-label={ariaLabel}
size={size}
Expand Down Expand Up @@ -169,6 +168,7 @@ function Dropdown({
})}
</ListBox.Menu>
</ListBox>
{!inline && !invalid && helper}
</div>
);
}
Expand Down
10 changes: 5 additions & 5 deletions packages/react/src/components/MultiSelect/MultiSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,6 @@ function MultiSelect({
{titleText}
</label>
)}
{!inline && helperText && (
<div id={helperId} className={helperClasses}>
{helperText}
</div>
)}
<ListBox
id={id}
type={type}
Expand Down Expand Up @@ -245,6 +240,11 @@ function MultiSelect({
})}
</ListBox.Menu>
</ListBox>
{!inline && !invalid && helperText && (
<div id={helperId} className={helperClasses}>
{helperText}
</div>
)}
</div>
);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/TextInput/TextInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ const TextInput = React.forwardRef(function TextInput(
return (
<div className={inputWrapperClasses}>
{label}
{helper}
<div
className={`${prefix}--text-input__field-wrapper`}
data-invalid={invalid || null}>
Expand All @@ -109,6 +108,7 @@ const TextInput = React.forwardRef(function TextInput(
{isFluid ? error : null}
</div>
{isFluid ? null : error}
{!invalid && !isFluid && helper}
</div>
);
});
Expand Down

0 comments on commit 4346f81

Please sign in to comment.