Skip to content

fix(PageHeader): updated type to ReactNode - #759

Merged
dlabaj merged 2 commits into
patternfly:mainfrom
thatblindgeye:pageheaderTypeFix
Jul 7, 2025
Merged

fix(PageHeader): updated type to ReactNode#759
dlabaj merged 2 commits into
patternfly:mainfrom
thatblindgeye:pageheaderTypeFix

Conversation

@thatblindgeye

@thatblindgeye thatblindgeye commented Jul 3, 2025

Copy link
Copy Markdown
Contributor

Updates here should allow ReactNode being passed to linkProps.label since that's only being passed as a child to the PF Button component (which accepts ReactNode).

Calling String on the linkProps label and passing that to the label prop on Button is mainly a means to not break anything. The current codebase should render in the DOM a label attribute with whatever is passed to linkProps.label, and all I'm doing is stringifying that in the case where a consumer is passing anything other than a string.

With these fixes passing a ReactNode:

image

With these fixes passing a string:

image

Existing logic passing a ReactNode:

image

Existing logic passing a string:

image

@patternfly-build

patternfly-build commented Jul 3, 2025

Copy link
Copy Markdown

@dlabaj dlabaj left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there's a linting issue.

@thatblindgeye
thatblindgeye requested a review from dlabaj July 3, 2025 15:30
@dlabaj
dlabaj merged commit cf8553e into patternfly:main Jul 7, 2025
6 checks passed
@github-actions

github-actions Bot commented Jul 7, 2025

Copy link
Copy Markdown

🎉 This PR is included in version 6.3.0-prerelease.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants