import { Table, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table'; // This example has been simplified to focus on the text modifier props. In real usage, // you may want to derive your rows from typed underlying data and minimal state. See other examples. const columnNames = { truncate: 'Truncate (width 20%)', break: 'Break word', wrap: 'Wrapping table header text. This th text will wrap instead of truncate.', fit: 'Fit content', nowrap: 'No wrap' }; export const TableControllingText: React.FunctionComponent = () => (
{columnNames.truncate} {columnNames.break} {columnNames.wrap} {columnNames.fit} {columnNames.nowrap}
This text will truncate instead of wrap. http://thisisaverylongurlthatneedstobreakusethebreakwordmodifier.org

By default, thead cells will truncate and tbody cells will wrap. Use .pf-m-wrap on ath to change its behavior.

This cell's content will adjust itself to the parent th width. This modifier only affects table layouts. No wrap
);