Files
vercel__workflow/docs/components/geistdocs/code-block-tabs.tsx
Hayden Bleasel c0991b4ff7 Update docs (#349)
* Initial migration

* Remove ExperimentalPackageCallout

* Remove Callout imports

* Add missing dep

* Update postgres-world.mdx

* Add missing deps, remove unused files

* Restore homepage css

* Update logo, fix homepage

* Update run-anywhere.tsx

* Remove duplicate h1 tags

* Fix package install commands

* Update global.css

* Update code-block.tsx

* Fix framework descriptions

* Remove unused files

* Fix steps

* Update sidebar.tsx

* Remove excess horizontal rules

* Remove unused components

* Cleanup home code-block component

* Update route.ts

* Add missing feed dep

* Rename middleware to proxy

* Update next config

* Update route.tsx

* Move generateDefinition call into tsx

* Update page.tsx

* Update sidebar.tsx

* Update layout.tsx

* Remove unused files

* Fix nav

* Update route.ts

* Remove deprecated lint:links

* Load fonts locally

* Update layout.tsx

* Update route.ts

* Update Geistdocs

* Update hero.tsx

* Update search.tsx

* Update search.tsx

* docs: update url structure in chat tools example

* chore: replace gpt-5 reasoning with gpt-5.1

* docs: update instructions for llm to be more workflow-centric

* Revert "docs: update instructions for llm to be more workflow-centric"

This reverts commit 3852820988.

* Update pnpm-lock.yaml

* Update home-layout.tsx

* Update layout.tsx

* Update pnpm-workspace.yaml

---------

Co-authored-by: Adrian Lam <me@adriandlam.com>
2025-11-19 16:17:21 -08:00

62 lines
1.3 KiB
TypeScript

import {
Tabs,
TabsContent,
TabsList,
TabsTrigger,
} from 'fumadocs-ui/components/tabs.unstyled';
import type { ComponentProps } from 'react';
import { cn } from '@/lib/utils';
export const CodeBlockTabsList = (props: ComponentProps<typeof TabsList>) => (
<TabsList
{...props}
className={cn(
'w-full rounded-none border-b bg-sidebar px-2.5 text-muted-foreground',
props.className
)}
>
{props.children}
</TabsList>
);
export const CodeBlockTabsTrigger = ({
children,
...props
}: ComponentProps<typeof TabsTrigger>) => (
<TabsTrigger
{...props}
className={cn(
'group relative px-1 py-2 text-sm data-[state=active]:text-primary',
props.className
)}
>
<div className="absolute inset-x-0 bottom-0 h-px group-data-[state=active]:bg-primary" />
{children}
</TabsTrigger>
);
export const CodeBlockTabs = ({
ref,
...props
}: ComponentProps<typeof Tabs>) => (
<Tabs
{...props}
className={cn(
'overflow-hidden rounded-sm border bg-background',
props.className
)}
>
{props.children}
</Tabs>
);
export const CodeBlockTab = (props: ComponentProps<typeof TabsContent>) => (
<TabsContent
{...props}
className={cn(
'[&>div]:mb-0 [&_pre]:rounded-none [&_pre]:border-none',
props.className
)}
/>
);