Skip to content

Commit fe47ff8

Browse files
committed
make card list more usable
1 parent 77a1d6b commit fe47ff8

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

app/cardsGrid/cardsGrid.tsx

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,21 @@ export default function CardsGrid({ cards }: CardsGridProps) {
3131

3232
return (
3333
<div className="w-full">
34-
{cardGroups.map((group) => {
35-
if (!group.cards) return null;
36-
return (
37-
<button
38-
type="button"
39-
key={group.id}
40-
onClick={() => handleTabClick(group.id)}
41-
>
42-
{group.id}
43-
</button>
44-
);
45-
})}
46-
34+
<div className="flex flex-wrap flex-row justify-start p-2">
35+
{cardGroups.map((group) => {
36+
if (!group.cards) return null;
37+
return (
38+
<button
39+
className={`flex flex-none basis-[60px] h-[48px] m-auto justify-center items-center ${activeTab === group.id ? "border-4 rounded-sm border-blue-300 dark:border-blue-700" : ""}`}
40+
type="button"
41+
key={group.id}
42+
onClick={() => handleTabClick(group.id)}
43+
>
44+
{group.id}
45+
</button>
46+
);
47+
})}
48+
</div>
4749
{/* Tab Content */}
4850
{cardGroups.map((group) => (
4951
<div

react-router.config.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import type { Config } from "@react-router/dev/config";
22
import getCardsPaths from "./app/lib/getCardsPaths";
33

44
export default {
5-
// Config options...
6-
// Server-side render by default, to enable SPA mode set this to `false`
75
ssr: false,
86
async prerender() {
97
const cardsPaths = getCardsPaths();

0 commit comments

Comments
 (0)