Skip to content

styles from @patternfly/react-styles/css/components/Form/form not properly passed at runtime #1119

@anderbubble

Description

@anderbubble

Following the example at
https://v5-archive.patternfly.org/components/forms/form/#basic with the starter kit causes the included <button><HelpIcon /></button> to omit the expected pf-v5-c-form__group-label-help class. This is because at compile time the imported styles is appropriately set to _default from export default _default; but at runtime styles is set to something like

{
  __esModule: true,
  default: {
    formGroupLabelHelp: "pf-v5-c-form__group-label-help",
    // …
  }
}

I have not been able to figure out how to resolve this behavior. For now, I'm using a workaround like this:

import rawStyles from '@patternfly/react-styles/css/components/Form/form';
const styles = rawStyles.default || rawStyles; // workaround

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions