import { useState } from 'react'; import { Table, Thead, Tr, Th, Tbody, Td, TableText } 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: 'Truncating text', wrap: 'Wrapping table header text. This th text will wrap instead of truncate.' }; export const TableTextModifiers: React.FunctionComponent = () => { const [focused, setFocused] = useState(false); return (
| {columnNames.truncate} | {columnNames.wrap} |
|---|---|
| setFocused(true)}
onBlur={() => setFocused(false)}
tabIndex={0}
dataLabel={columnNames.truncate}
>
|
|