Skip to content

Commit bf6f2d1

Browse files
committed
Fixing prev/next button styling
1 parent a5cec91 commit bf6f2d1

File tree

1 file changed

+17
-6
lines changed
  • apps/demo-react-router/app/routes

1 file changed

+17
-6
lines changed

apps/demo-react-router/app/routes/home.tsx

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
1-
import type { Route } from "./+types/home";
1+
import type { Route } from './+types/home';
22
import { useRef, useState } from 'react';
33
import { usePdf } from '@mikecousins/react-pdf';
44
import clsx from 'clsx';
5-
import { ArrowLeftCircleIcon, ArrowRightCircleIcon } from '@heroicons/react/24/solid';
5+
import {
6+
ArrowLeftCircleIcon,
7+
ArrowRightCircleIcon,
8+
} from '@heroicons/react/24/solid';
69

710
export function meta({}: Route.MetaArgs) {
811
return [
9-
{ title: "New React Router App" },
10-
{ name: "description", content: "Welcome to React Router!" },
12+
{ title: '@mikecousins/react-pdf' },
13+
{
14+
name: 'description',
15+
content:
16+
'The simplest PDF rendering library for modern websites. @mikecousins/react-pdf is super lightweight and will embed a PDF in your website easily.',
17+
},
1118
];
1219
}
1320

@@ -51,7 +58,9 @@ export default function Home() {
5158
<button
5259
disabled={previousDisabled}
5360
onClick={() => setPage(page - 1)}
54-
className={clsx(previousDisabled && 'text-gray-300')}
61+
className={clsx(
62+
previousDisabled ? 'text-gray-300' : 'text-gray-900'
63+
)}
5564
>
5665
<ArrowLeftCircleIcon className="h-12 w-12" />
5766
</button>
@@ -66,7 +75,9 @@ export default function Home() {
6675
<button
6776
disabled={nextDisabled}
6877
onClick={() => setPage(page + 1)}
69-
className={clsx(nextDisabled && 'text-gray-300')}
78+
className={clsx(
79+
nextDisabled ? 'text-gray-300' : 'text-gray-900'
80+
)}
7081
>
7182
<ArrowRightCircleIcon className="h-12 w-12" />
7283
</button>

0 commit comments

Comments
 (0)