Skip to content

Commit

Permalink
lib: Don't show icon unless 'icon' prop is passed
Browse files Browse the repository at this point in the history
As per patternfly guidelines [1], validation text (which is main use of
FormHelper) should not have an icon

[1] https://www.patternfly.org/components/forms/form/design-guidelines/#errors-and-validation
  • Loading branch information
skobyda committed Aug 29, 2023
1 parent 97cc456 commit 64522bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/lib/cockpit-components-form-helper.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const FormHelper = ({ helperText, helperTextInvalid, variant, icon, field
<HelperTextItem
id={fieldId ? (fieldId + "-helper") : undefined}
variant={formHelperVariant}
hasIcon={formHelperVariant !== "default" || icon} icon={icon}>
icon={icon}>
{formHelperVariant === "error" ? helperTextInvalid : helperText}
</HelperTextItem>
</HelperText>
Expand Down

0 comments on commit 64522bb

Please sign in to comment.