Skip to content

Commit

Permalink
docs(FormGroup): use actual classname instead of token
Browse files Browse the repository at this point in the history
  • Loading branch information
adamviktora committed Feb 27, 2024
1 parent e6e7e60 commit d7ddf56
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### formGroup-rename-labelIcon [(#10016)](https://github.com/patternfly/patternfly-react/pull/10016)

The `labelIcon` prop for FormGroup has been renamed to `labelHelp`. We recommend using FormGroupLabelHelp element for the labelHelp prop. The markup has also changed, we now wrap the labelHelp element in `<span className={styles.formGroupLabelHelp}>`, so there is no need to add `className={styles.formGroupLabelHelp}` to the labelHelp element.
The `labelIcon` prop for FormGroup has been renamed to `labelHelp`. We recommend using FormGroupLabelHelp element for the labelHelp prop. The markup has also changed, we now wrap the labelHelp element in `<span className="pf-v6-c-form__group-label-help">`, so there is no need to add `className="pf-v6-c-form__group-label-help"` to the labelHelp element.

#### Examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ruleTester.run("formGroup-rename-labelIcon", rule, {
output: `import { FormGroup } from '@patternfly/react-core'; <FormGroup labelHelp={<>Help icon</>} />`,
errors: [
{
message: `The \`labelIcon\` prop for FormGroup has been renamed to \`labelHelp\`. We recommend using FormGroupLabelHelp element for the labelHelp prop. The markup has also changed, we now wrap the labelHelp element in \`<span className={styles.formGroupLabelHelp}>\`, so there is no need to add \`className={styles.formGroupLabelHelp}\` to the labelHelp element.`,
message: `The \`labelIcon\` prop for FormGroup has been renamed to \`labelHelp\`. We recommend using FormGroupLabelHelp element for the labelHelp prop. The markup has also changed, we now wrap the labelHelp element in \`<span className="pf-v6-c-form__group-label-help">\`, so there is no need to add \`className="pf-v6-c-form__group-label-help"\` to the labelHelp element.`,
type: "JSXOpeningElement",
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = {
FormGroup: {
labelIcon: {
newName: "labelHelp",
message: `The \`labelIcon\` prop for FormGroup has been renamed to \`labelHelp\`. We recommend using FormGroupLabelHelp element for the labelHelp prop. The markup has also changed, we now wrap the labelHelp element in \`<span className={styles.formGroupLabelHelp}>\`, so there is no need to add \`className={styles.formGroupLabelHelp}\` to the labelHelp element.`,
message: `The \`labelIcon\` prop for FormGroup has been renamed to \`labelHelp\`. We recommend using FormGroupLabelHelp element for the labelHelp prop. The markup has also changed, we now wrap the labelHelp element in \`<span className="pf-v6-c-form__group-label-help">\`, so there is no need to add \`className="pf-v6-c-form__group-label-help"\` to the labelHelp element.`,
},
},
}),
Expand Down

0 comments on commit d7ddf56

Please sign in to comment.