Skip to content

Text - replace with Content #663

@adamviktora

Description

@adamviktora

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions