Skip to content

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

g1t.sh
49 linesCodeBlameRaw

Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.

Git storage hardened, pages in tens of milliseconds, honest security alerts, and costs reconciled daily1import { Tabs as Primitive } from "radix-ui";
2import type { ComponentProps } from "react";
3
4import { cn } from "../../lib/cn";
5
6// shadcn/ui's tabs, styled with g1t's tokens.
7
8export const Tabs = Primitive.Root;
9
10export function TabsList({
11 className,
12 ...props
13}: ComponentProps<typeof Primitive.List>) {
14 return (
15 <Primitive.List
16 className={cn(
17 "inline-flex items-center gap-1 rounded-lg border border-line bg-bg p-1",
18 className,
19 )}
20 {...props}
21 />
22 );
23}
24
25export function TabsTrigger({
26 className,
27 ...props
28}: ComponentProps<typeof Primitive.Trigger>) {
29 return (
30 <Primitive.Trigger
31 className={cn(
32 "rounded-md px-2.5 py-1 text-xs font-medium text-muted transition-colors outline-none hover:text-fg",
33 "data-[state=active]:bg-raised data-[state=active]:text-fg",
34 "disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:text-muted",
35 className,
36 )}
37 {...props}
38 />
39 );
40}
41
42export function TabsContent({
43 className,
44 ...props
45}: ComponentProps<typeof Primitive.Content>) {
46 return (
47 <Primitive.Content className={cn("mt-3 outline-none", className)} {...props} />
48 );
49}

This file's history is long; its oldest lines are credited to the oldest commit read.