Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text - replace with Content #663

Closed
adamviktora opened this issue Jun 11, 2024 · 1 comment · Fixed by #675
Closed

Text - replace with Content #663

adamviktora opened this issue Jun 11, 2024 · 1 comment · Fixed by #675
Assignees

Comments

@adamviktora
Copy link
Contributor

adamviktora commented Jun 11, 2024

Follow up to breaking change PRs: patternfly/patternfly-react#10611 and patternfly/patternfly-react#10643

Use Content instead of Text, TextList, TextListItem and TextContent.

<Text component="h3"> -> <Content component="h3">
<Text> -> <Content component="p">
<TextContent> -> <Content>
<TextContent isVisited> -> <Content isVisitedLink>
<TextList> -> <Content component="ul">
<TextList isPlain> -> <Content component="ul" isPlainList>
<TextList component="ol"> -> <Content component="ol">
<TextListItem> -> <Content component="li">
<TextListItem component="dt"> -> <Content component="dt">

We might want to try:

  • if previously wrapped in <TextContent> or in <TextList>, replace with corresponding simple html element, but ONLY IF there is no specific prop on that component - isPlain (TextList), isVisitedLink (Text)

Required actions:

  1. Build codemod
  2. Build test
  3. Update readme with description & example
@thatblindgeye
Copy link
Collaborator

patternfly/patternfly-react#10611 is also related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants