import * as T from '@radix-ui/react-tabs';
import classnames from 'classnames';
import type { ComponentChildren } from 'preact';
import { useState } from 'react';
import { Button } from './Button';
import { ScrollArea } from './ScrollArea';
import { HStack } from './Stacks';
import './Tabs.css';
interface Props {
defaultValue?: string;
label: string;
tabs: { value: string; label: ComponentChildren }[];
tabListClassName?: string;
className?: string;
children: ComponentChildren;
}
export function Tabs({ defaultValue, label, children, tabs, className, tabListClassName }: Props) {
const [value, setValue] = useState(defaultValue);
return (
{tabs.map((t) => (
{t.label}
))}
{children}
);
}
interface TabTriggerProps {
value: string;
children: ComponentChildren;
active?: boolean;
}
export function TabTrigger({ value, children, active }: TabTriggerProps) {
return (
);
}
interface TabContentProps {
value: string;
children: ComponentChildren;
className?: string;
}
export function TabContent({ value, children, className }: TabContentProps) {
return (
{children}
);
}