From 871c9d70b9897347810d0e9aeb40fcf6fc587d73 Mon Sep 17 00:00:00 2001 From: armorbreak001 Date: Tue, 14 Apr 2026 20:50:39 +0800 Subject: [PATCH] feat(frontend): add responsive BountyGrid layout component - Add BountyGrid.tsx with CSS Grid responsive breakpoints (1/2/3/4 cols) - Mobile: 1 col, Tablet: 2 cols, Desktop: 3 cols, Wide: 4 cols - Uses gap-6 for consistent spacing - Export from bounty component index --- frontend/src/components/bounty/BountyGrid.tsx | 31 +++++++++++++++++++ frontend/src/components/bounty/index.ts | 3 +- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 frontend/src/components/bounty/BountyGrid.tsx diff --git a/frontend/src/components/bounty/BountyGrid.tsx b/frontend/src/components/bounty/BountyGrid.tsx new file mode 100644 index 0000000..34b4709 --- /dev/null +++ b/frontend/src/components/bounty/BountyGrid.tsx @@ -0,0 +1,31 @@ +'use client' + +import React from 'react' +import { cn } from '@/lib/utils' + +interface BountyGridProps { + children: React.ReactNode + className?: string +} + +/** + * BountyGrid - Responsive grid layout for bounty cards. + * + * Breakpoints: + * - < 640px (mobile): 1 column + * - ≥ 768px (tablet): 2 columns + * - ≥1024px (desktop): 3 columns + * - ≥1280px (wide): 4 columns + */ +export default function BountyGrid({ children, className }: BountyGridProps) { + return ( +
+ {children} +
+ ) +} diff --git a/frontend/src/components/bounty/index.ts b/frontend/src/components/bounty/index.ts index 7eef398..6a79bc6 100644 --- a/frontend/src/components/bounty/index.ts +++ b/frontend/src/components/bounty/index.ts @@ -1,2 +1,3 @@ export { default as BountyCard } from './BountyCard' -export type { BountyStatus } from './BountyCard' \ No newline at end of file +export type { BountyStatus } from './BountyCard' +export { default as BountyGrid } from './BountyGrid' \ No newline at end of file