feat: created competitions page model

This commit is contained in:
rngsurrounded
2025-03-01 14:29:12 +09:00
parent 6a993ce6ba
commit 9362ee30a9
34 changed files with 928 additions and 6 deletions
@@ -0,0 +1,70 @@
import * as React from "react"
import * as TabsPrimitive from "@radix-ui/react-tabs"
import { cn } from "@/shared/lib/utils"
function Tabs({
className,
...props
}: React.ComponentProps<typeof TabsPrimitive.Root>) {
return (
<TabsPrimitive.Root
data-slot="tabs"
className={cn("flex flex-col", className)}
{...props}
/>
)
}
function TabsList({
className,
...props
}: React.ComponentProps<typeof TabsPrimitive.List>) {
return (
<TabsPrimitive.List
data-slot="tabs-list"
className={cn(
"inline-flex items-center justify-center gap-6",
className
)}
{...props}
/>
)
}
function TabsTrigger({
className,
value,
...props
}: React.ComponentProps<typeof TabsPrimitive.Trigger> & { value: string }) {
return (
<TabsPrimitive.Trigger
data-slot="tabs-trigger"
value={value}
className={cn(
"relative px-1 py-2 text-sm font-medium outline-none",
"text-gray-500",
"data-[state=active]:font-semibold after:absolute after:bottom-0 after:left-0 after:right-0 after:h-0.5",
value === "ongoing" && "data-[state=active]:text-yellow-500 data-[state=active]:after:bg-yellow-500",
value === "completed" && "data-[state=active]:text-green-500 data-[state=active]:after:bg-green-500",
className
)}
{...props}
/>
)
}
function TabsContent({
className,
...props
}: React.ComponentProps<typeof TabsPrimitive.Content>) {
return (
<TabsPrimitive.Content
data-slot="tabs-content"
className={cn("mt-2 outline-none", className)}
{...props}
/>
)
}
export { Tabs, TabsList, TabsTrigger, TabsContent }