diff --git a/packages/react-core/src/components/Content/__tests__/__snapshots__/TextContent.test.tsx.snap b/packages/react-core/src/components/Content/__tests__/__snapshots__/TextContent.test.tsx.snap
deleted file mode 100644
index 6e89543c768..00000000000
--- a/packages/react-core/src/components/Content/__tests__/__snapshots__/TextContent.test.tsx.snap
+++ /dev/null
@@ -1,11 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`Matches the snapshot 1`] = `
-
-
- Test
-
-
-`;
diff --git a/packages/react-core/src/components/Content/__tests__/__snapshots__/TextList.test.tsx.snap b/packages/react-core/src/components/Content/__tests__/__snapshots__/TextList.test.tsx.snap
deleted file mode 100644
index 08ef0add850..00000000000
--- a/packages/react-core/src/components/Content/__tests__/__snapshots__/TextList.test.tsx.snap
+++ /dev/null
@@ -1,11 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`Matches the snapshot 1`] = `
-
-
-
-`;
diff --git a/packages/react-core/src/components/Content/__tests__/__snapshots__/TextListItem.test.tsx.snap b/packages/react-core/src/components/Content/__tests__/__snapshots__/TextListItem.test.tsx.snap
deleted file mode 100644
index 514daf612d4..00000000000
--- a/packages/react-core/src/components/Content/__tests__/__snapshots__/TextListItem.test.tsx.snap
+++ /dev/null
@@ -1,11 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`Matches the snapshot 1`] = `
-
-
- Test
-
-
-`;
diff --git a/packages/react-core/src/components/Content/examples/Content.md b/packages/react-core/src/components/Content/examples/Content.md
index 170c085f210..3f6de645462 100644
--- a/packages/react-core/src/components/Content/examples/Content.md
+++ b/packages/react-core/src/components/Content/examples/Content.md
@@ -1,18 +1,26 @@
---
id: Content
section: components
-cssPrefix: pf-v5-c-content
-propComponents: ['TextContent', 'Text', 'TextList', 'TextListItem']
+cssPrefix: pf-v6-c-content
+propComponents: ['Content']
---
-The `
` component provides simple, built-in styling for putting common blocks of HTML elements together. It establishes the block of content and styling within it for the elements listed in the `component` property(`h1` through `h6`, `p`, `a`, `small`, `blockquote`, and `pre`), as well as the text component suite ``, and ``. `TextContent` may be used as a container for the text components, but nesting them inside `` is not required.
+The `` component allows you to establish a block of HTML content and apply simple, built-in styling. `` can be used for any element supported by the `component` property (including `h1` through `h6`, `hr`, `p`, `a`, `small`, `blockquote`, and `pre`).
-You cannot nest other components within ``, and doing so can cause styling overrides or other conflicts. Instead, you can use the `` component's properties to achieve the same results.
+You cannot nest other components within ``, and doing so can cause styling overrides or other conflicts. Instead, you can use the `` component's properties to achieve the same results.
-For example, rather than nesting the `` and `` components within ``, you should pass `component="h1"` into the `` and `` components. Similarly, when you need to add a divider , rather than passing in a separate `` component, you should utilize the `hr` property that `` supports, which will be styled as a divider.
+For example, to create a level 1 heading, you should pass `component="h1"` to ``, instead of nesting a `` component within ``. Similarly, when you need to add a divider to a page, you should utilize the `hr` property of `` (which is styled as a divider), rather than using a separate `` component.
## Examples
+HTML elements wrapped by `` are styled by the content component.
+
+### Content as a wrapper
+
+```ts file="./ContentWrapper.tsx"
+
+```
+
### Headings
```ts file="./ContentHeadings.tsx"
@@ -49,14 +57,6 @@ For example, rather than nesting the `` and `` components within `<
```
-Text components such as Text, TextList, TextListItem can be placed within a TextContent to provide styling for html elements, and additional styling options applied to the children.
-
-### Wrapped in TextContent
-
-```ts file="./ContentWrapper.tsx"
-
-```
-
### Link and visited link
```ts file="./ContentVisited.tsx"
diff --git a/packages/react-core/src/components/Content/examples/ContentBody.tsx b/packages/react-core/src/components/Content/examples/ContentBody.tsx
index 922e90bce7a..b94e9e2c524 100644
--- a/packages/react-core/src/components/Content/examples/ContentBody.tsx
+++ b/packages/react-core/src/components/Content/examples/ContentBody.tsx
@@ -1,24 +1,26 @@
import React from 'react';
-import { Text, TextVariants } from '@patternfly/react-core';
+import { Content, ContentVariants } from '@patternfly/react-core';
export const ContentBody: React.FunctionComponent = () => (
<>
-
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla accumsan, metus ultrices eleifend gravida, nulla
nunc varius lectus, nec rutrum justo nibh eu lectus. Ut vulputate semper dui. Fusce erat odio, sollicitudin vel
erat vel, interdum mattis neque. Sub works as well!
-
-
+
+
Quisque ante lacus, malesuada ac auctor vitae, congue{' '}
-
+
non ante
-
+
. Phasellus lacus ex, semper ac tortor nec, fringilla condimentum orci. Fusce eu rutrum tellus.
-
-
+
+
Ut venenatis, nisl scelerisque sollicitudin fermentum, quam libero hendrerit ipsum, ut blandit est tellus sit amet
turpis.
-
- Sometimes you need small text to display things like date created
+
+
+ Sometimes you need small text to display things like date created
+
>
);
diff --git a/packages/react-core/src/components/Content/examples/ContentDescriptionList.tsx b/packages/react-core/src/components/Content/examples/ContentDescriptionList.tsx
index 6ffc2422ba6..7742ca50f94 100644
--- a/packages/react-core/src/components/Content/examples/ContentDescriptionList.tsx
+++ b/packages/react-core/src/components/Content/examples/ContentDescriptionList.tsx
@@ -1,15 +1,13 @@
import React from 'react';
-import { TextList, TextListVariants, TextListItem, TextListItemVariants } from '@patternfly/react-core';
+import { Content, ContentVariants } from '@patternfly/react-core';
export const ContentDescriptionList: React.FunctionComponent = () => (
-
- Web
-
- The part of the Internet that contains websites and web pages
-
- HTML
- A markup language for creating web pages
- CSS
- A technology to make HTML look better
-
+
+ Web
+ The part of the Internet that contains websites and web pages
+ HTML
+ A markup language for creating web pages
+ CSS
+ A technology to make HTML look better
+
);
diff --git a/packages/react-core/src/components/Content/examples/ContentHeadings.tsx b/packages/react-core/src/components/Content/examples/ContentHeadings.tsx
index 0f222aee7ae..f0a6f4b3c0e 100644
--- a/packages/react-core/src/components/Content/examples/ContentHeadings.tsx
+++ b/packages/react-core/src/components/Content/examples/ContentHeadings.tsx
@@ -1,13 +1,13 @@
import React from 'react';
-import { Text, TextVariants } from '@patternfly/react-core';
+import { Content, ContentVariants } from '@patternfly/react-core';
export const ContentHeadings: React.FunctionComponent = () => (
<>
- Hello World
- Second level
- Third level
- Fourth level
- Fifth level
- Sixth level
+ Hello World
+ Second level
+ Third level
+ Fourth level
+ Fifth level
+ Sixth level
>
);
diff --git a/packages/react-core/src/components/Content/examples/ContentOrderedList.tsx b/packages/react-core/src/components/Content/examples/ContentOrderedList.tsx
index 08ddf3d79f0..24dd49c2c5d 100644
--- a/packages/react-core/src/components/Content/examples/ContentOrderedList.tsx
+++ b/packages/react-core/src/components/Content/examples/ContentOrderedList.tsx
@@ -1,14 +1,14 @@
import React from 'react';
-import { TextList, TextListVariants, TextListItem } from '@patternfly/react-core';
+import { Content, ContentVariants } from '@patternfly/react-core';
export const ContentOrderedList: React.FunctionComponent = () => (
-
- Donec blandit a lorem id convallis.
- Cras gravida arcu at diam gravida gravida.
- Integer in volutpat libero.
- Donec a diam tellus.
- Aenean nec tortor orci.
- Quisque aliquam cursus urna, non bibendum massa viverra eget.
- Vivamus maximus ultricies pulvinar.
-
+
+ Donec blandit a lorem id convallis.
+ Cras gravida arcu at diam gravida gravida.
+ Integer in volutpat libero.
+ Donec a diam tellus.
+ Aenean nec tortor orci.
+ Quisque aliquam cursus urna, non bibendum massa viverra eget.
+ Vivamus maximus ultricies pulvinar.
+
);
diff --git a/packages/react-core/src/components/Content/examples/ContentPlainList.tsx b/packages/react-core/src/components/Content/examples/ContentPlainList.tsx
index aa55b8c36b7..e49e4512868 100644
--- a/packages/react-core/src/components/Content/examples/ContentPlainList.tsx
+++ b/packages/react-core/src/components/Content/examples/ContentPlainList.tsx
@@ -1,24 +1,28 @@
import React from 'react';
-import { Text, TextVariants, TextList, TextListVariants, TextListItem } from '@patternfly/react-core';
+import { Content, ContentVariants } from '@patternfly/react-core';
export const ContentPlainList: React.FunctionComponent = () => (
<>
- Plain unordered list
-
- In fermentum leo eu lectus mollis, quis dictum mi aliquet.
- Morbi eu nulla lobortis, lobortis est in, fringilla felis.
- Aliquam nec felis in sapien venenatis viverra fermentum nec lectus.
- Ut non enim metus.
-
- Plain ordered list
-
- Donec blandit a lorem id convallis.
- Cras gravida arcu at diam gravida gravida.
- Integer in volutpat libero.
- Donec a diam tellus.
- Aenean nec tortor orci.
- Quisque aliquam cursus urna, non bibendum massa viverra eget.
- Vivamus maximus ultricies pulvinar.
-
+ Plain unordered list
+
+ In fermentum leo eu lectus mollis, quis dictum mi aliquet.
+ Morbi eu nulla lobortis, lobortis est in, fringilla felis.
+
+ Aliquam nec felis in sapien venenatis viverra fermentum nec lectus.
+
+ Ut non enim metus.
+
+ Plain ordered list
+
+ Donec blandit a lorem id convallis.
+
+ {' '}
+ component={ContentVariants.li}Cras gravida arcu at diam gravida gravida.
+
+ Integer in volutpat libero.
+ Aenean nec tortor orci.
+ Quisque aliquam cursus urna, non bibendum massa viverra eget.
+ Vivamus maximus ultricies pulvinar.
+
>
);
diff --git a/packages/react-core/src/components/Content/examples/ContentUnorderedList.tsx b/packages/react-core/src/components/Content/examples/ContentUnorderedList.tsx
index 30f5aaa486d..356edfe1b0f 100644
--- a/packages/react-core/src/components/Content/examples/ContentUnorderedList.tsx
+++ b/packages/react-core/src/components/Content/examples/ContentUnorderedList.tsx
@@ -1,17 +1,17 @@
import React from 'react';
-import { TextList, TextListItem } from '@patternfly/react-core';
+import { Content, ContentVariants } from '@patternfly/react-core';
export const ContentUnorderedList: React.FunctionComponent = () => (
-
- In fermentum leo eu lectus mollis, quis dictum mi aliquet.
- Morbi eu nulla lobortis, lobortis est in, fringilla felis.
-
+
+ In fermentum leo eu lectus mollis, quis dictum mi aliquet.
+ Morbi eu nulla lobortis, lobortis est in, fringilla felis.
+
Aliquam nec felis in sapien venenatis viverra fermentum nec lectus.
-
- In fermentum leo eu lectus mollis, quis dictum mi aliquet.
- Morbi eu nulla lobortis, lobortis est in, fringilla felis.
-
-
- Ut non enim metus.
-
+
+ In fermentum leo eu lectus mollis, quis dictum mi aliquet.
+ Morbi eu nulla lobortis, lobortis est in, fringilla felis.
+
+
+ Ut non enim metus.
+
);
diff --git a/packages/react-core/src/components/Content/examples/ContentVisited.tsx b/packages/react-core/src/components/Content/examples/ContentVisited.tsx
index 1692938f52e..56fe72aa1b1 100644
--- a/packages/react-core/src/components/Content/examples/ContentVisited.tsx
+++ b/packages/react-core/src/components/Content/examples/ContentVisited.tsx
@@ -1,34 +1,34 @@
import React from 'react';
-import { TextContent, Text, TextVariants } from '@patternfly/react-core';
+import { Content, ContentVariants } from '@patternfly/react-core';
export const ContentVisited: React.FunctionComponent = () => (
<>
-
- Link example
-
-
+
+ Link example
+
+
Click to visit link
-
-
-
+
+
+
-
- Link content example
-
-
+
+ Link content example
+
+
content link 1
-
-
-
-
+
+
+
+
content link 2
-
-
-
-
+
+
+
+
content link 3
-
-
-
+
+
+
>
);
diff --git a/packages/react-core/src/components/Content/examples/ContentWrapper.tsx b/packages/react-core/src/components/Content/examples/ContentWrapper.tsx
index 8e2b9ed593e..e8ed09652c2 100644
--- a/packages/react-core/src/components/Content/examples/ContentWrapper.tsx
+++ b/packages/react-core/src/components/Content/examples/ContentWrapper.tsx
@@ -1,11 +1,11 @@
import React from 'react';
-import { TextContent, Text, TextVariants } from '@patternfly/react-core';
+import { Content, ContentVariants } from '@patternfly/react-core';
export const ContentWrapper: React.FunctionComponent = () => (
-
-
- Text with a component of type "p" still renders the same when wrapped with a TextContent.
-
- If located within a wrapping TextContent, html elements are styled as well!
-
+
+
+ Content with a component of type "p" still renders the same when wrapped with a Content.
+
+ If located within a wrapping Content, html elements are styled as well!
+
);
diff --git a/packages/react-core/src/components/Content/index.ts b/packages/react-core/src/components/Content/index.ts
index ef7483f3f13..b39182a1a2f 100644
--- a/packages/react-core/src/components/Content/index.ts
+++ b/packages/react-core/src/components/Content/index.ts
@@ -1,4 +1 @@
export * from './Content';
-export * from './TextContent';
-export * from './TextList';
-export * from './TextListItem';
diff --git a/packages/react-core/src/components/DataList/examples/DataListWidthModifiers.tsx b/packages/react-core/src/components/DataList/examples/DataListWidthModifiers.tsx
index 361c85aabb1..47c316c761e 100644
--- a/packages/react-core/src/components/DataList/examples/DataListWidthModifiers.tsx
+++ b/packages/react-core/src/components/DataList/examples/DataListWidthModifiers.tsx
@@ -1,5 +1,6 @@
import React from 'react';
import {
+ Content,
DataList,
DataListItem,
DataListCell,
@@ -9,9 +10,6 @@ import {
DataListContent,
DataListItemCells,
DataListItemRow,
- Text,
- TextVariants,
- TextContent,
Dropdown,
DropdownList,
DropdownItem,
@@ -44,9 +42,9 @@ export const DataListWidthModifiers: React.FunctionComponent = () => {
return (
<>
-
- Default fitting - example 1
-
+
+ Default fitting - example 1
+
-
- Flex modifiers - example 2
-
+
+ Flex modifiers - example 2
+
-
- Flex modifiers - example 3
-
+
+ Flex modifiers - example 3
+