Add core UI components and layout for media platform
Initializes the client-side application with fundamental UI components, including navigation, cards for articles and auctions, and various elements for user interaction and display. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 069d4324-6c40-4355-955e-c714a50de1ea Replit-Commit-Checkpoint-Type: intermediate_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/3df548ff-50ae-432f-9be4-25d34eccc983/069d4324-6c40-4355-955e-c714a50de1ea/bVdKIaU
This commit is contained in:
40
client/src/components/CategoryTabs.tsx
Normal file
40
client/src/components/CategoryTabs.tsx
Normal file
@ -0,0 +1,40 @@
|
||||
import { Button } from "@/components/ui/button";
|
||||
|
||||
interface CategoryTabsProps {
|
||||
selectedCategory: string;
|
||||
onCategoryChange: (category: string) => void;
|
||||
}
|
||||
|
||||
const categories = [
|
||||
{ id: "people", label: "People", icon: "fas fa-users", count: 24 },
|
||||
{ id: "topics", label: "Topics", icon: "fas fa-hashtag", count: 20 },
|
||||
{ id: "companies", label: "Companies", icon: "fas fa-building", count: 27 },
|
||||
];
|
||||
|
||||
export default function CategoryTabs({ selectedCategory, onCategoryChange }: CategoryTabsProps) {
|
||||
return (
|
||||
<div className="mb-8">
|
||||
<div className="border-b border-border">
|
||||
<nav className="flex space-x-8">
|
||||
{categories.map((category) => (
|
||||
<Button
|
||||
key={category.id}
|
||||
variant="ghost"
|
||||
className={`px-6 py-3 font-semibold rounded-t-lg transition-all ${
|
||||
selectedCategory === category.id
|
||||
? "bg-primary text-primary-foreground"
|
||||
: "text-muted-foreground hover:text-foreground"
|
||||
}`}
|
||||
onClick={() => onCategoryChange(category.id)}
|
||||
data-testid={`tab-${category.id}`}
|
||||
>
|
||||
<i className={`${category.icon} mr-2`}></i>
|
||||
{category.label}
|
||||
<span className="ml-2 text-sm opacity-75">({category.count})</span>
|
||||
</Button>
|
||||
))}
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user