diff --git a/packages/react-core/src/demos/RTL/RTL.md b/packages/react-core/src/demos/RTL/RTL.md index a839b4d8271..7285d2b3f36 100644 --- a/packages/react-core/src/demos/RTL/RTL.md +++ b/packages/react-core/src/demos/RTL/RTL.md @@ -1,5 +1,5 @@ --- -id: RTL +id: Right-to-left section: patterns --- diff --git a/packages/react-core/src/demos/RTL/examples/PaginatedTable.jsx b/packages/react-core/src/demos/RTL/examples/PaginatedTable.jsx index 6b18af0e6e0..3199822b294 100644 --- a/packages/react-core/src/demos/RTL/examples/PaginatedTable.jsx +++ b/packages/react-core/src/demos/RTL/examples/PaginatedTable.jsx @@ -43,7 +43,6 @@ import { } from '@patternfly/react-core'; import { Table, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table'; -import { capitalize } from '../../../helpers'; import translationsEn from './examples/translations.en.json'; import translationsHe from './examples/translations.he.json'; import AlignRightIcon from '@patternfly/react-icons/dist/esm/icons/align-right-icon'; @@ -114,6 +113,8 @@ export const PaginatedTableAction = () => { const [paginatedRows, setPaginatedRows] = React.useState(rows.slice(0, 10)); const [isDirRTL, setIsDirRTL] = React.useState(false); + const capitalize = (input) => input[0].toUpperCase() + input.substring(1); + const switchTranslation = () => { setIsDirRTL((prevIsDirRTL) => !prevIsDirRTL); setTranslation((prevTranslation) => (prevTranslation === translationsEn ? translationsHe : translationsEn));