Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update ContentsLayout.js
Add Arrow Icons in place of arrow symbols
  • Loading branch information
arghyaxcodes committed Feb 6, 2022
commit 43b9f66a33b85068ed9b7294d8a1834f3a928dfb
13 changes: 5 additions & 8 deletions src/layouts/ContentsLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { ClassTable } from '@/components/ClassTable'
import { PageHeader } from '@/components/PageHeader'
import { usePrevNext } from '@/hooks/usePrevNext'
import { SidebarContext, SidebarLayout } from '@/layouts/SidebarLayout'
import { ArrowLeftIcon, ArrowRightIcon } from '@heroicons/react/outline'
import clsx from 'clsx'
import Link from 'next/link'
import { useRouter } from 'next/router'
Expand Down Expand Up @@ -191,21 +192,17 @@ export function ContentsLayout({ children, meta, classes, tableOfContents }) {
<div className="mt-16 flex font-medium leading-6">
{prev && (
<Link href={prev.href}>
<a className="mr-8 flex rounded-md border-2 border-blue-500 px-2 py-1 text-gray-400 transition-colors duration-200 hover:text-gray-900 hover:shadow-md dark:border-blue-400 dark:hover:text-white">
<span aria-hidden="true" className="mr-2">
&larr;
</span>
<a className="mr-8 flex items-center rounded-md border-2 border-blue-500 px-2 py-1 text-gray-500 transition-colors duration-200 hover:text-gray-900 hover:shadow-md dark:border-blue-400 dark:text-gray-400 dark:hover:text-white">
<ArrowLeftIcon className="mr-2 h-5 w-5" />
{prev.shortTitle || prev.title}
</a>
</Link>
)}
{next && (
<Link href={next.href}>
<a className="ml-auto flex rounded-md border-2 border-blue-500 px-2 py-1 text-right text-gray-400 transition-colors duration-200 hover:text-gray-900 hover:shadow-md dark:border-blue-400 dark:hover:text-white">
<a className="ml-auto flex items-center rounded-md border-2 border-blue-500 px-2 py-1 text-right text-gray-500 transition-colors duration-200 hover:text-gray-900 hover:shadow-md dark:border-blue-400 dark:text-gray-400 dark:hover:text-white">
{next.shortTitle || next.title}
<span aria-hidden="true" className="ml-2">
&rarr;
</span>
<ArrowRightIcon className="ml-2 h-5 w-5" />
</a>
</Link>
)}
Expand Down