github.com/kubri/kubri@v0.5.1-0.20240317001612-bda2aaef967e/website/src/plugins/changelog/theme/ChangelogPaginator/index.tsx (about) 1 /** 2 * Copyright (c) Facebook, Inc. and its affiliates. 3 * 4 * This source code is licensed under the MIT license found in the 5 * LICENSE file in the root directory of this source tree. 6 */ 7 8 // Changed the text labels. 9 10 import { JSX } from 'react' 11 import Translate, { translate } from '@docusaurus/Translate' 12 import PaginatorNavLink from '@theme/PaginatorNavLink' 13 import type { Props } from '@theme/BlogPostPaginator' 14 15 export default function ChangelogPaginator({ nextItem, prevItem }: Props): JSX.Element { 16 return ( 17 <nav 18 className="pagination-nav docusaurus-mt-lg" 19 aria-label={translate({ 20 id: 'theme.changelog.post.paginator.navAriaLabel', 21 message: 'Changelog item navigation', 22 description: 'The ARIA label for the changelog pagination', 23 })} 24 > 25 {prevItem && ( 26 <PaginatorNavLink 27 {...prevItem} 28 subLabel={ 29 <Translate 30 id="theme.changelog.post.paginator.newerRelease" 31 description="The changelog button label to navigate to the newer release" 32 > 33 Newer release 34 </Translate> 35 } 36 /> 37 )} 38 {nextItem && ( 39 <PaginatorNavLink 40 {...nextItem} 41 subLabel={ 42 <Translate 43 id="theme.changelog.post.paginator.olderRelease" 44 description="The changelog button label to navigate to the older release" 45 > 46 Older release 47 </Translate> 48 } 49 isNext 50 /> 51 )} 52 </nav> 53 ) 54 }