import { useState } from "react";
import type { Meta, StoryObj } from "@storybook/react-vite";
import { Tabs, type TabItem } from "@shared/components/Tabs";
const baseItems: TabItem[] = [
{ key: "deployed", label: "Deployed", count: 6 },
{ key: "templates", label: "Templates", count: 4 },
{ key: "archive", label: "Archive", count: 0 },
];
function Bound({
items = baseItems,
variant = "pill" as const,
}: {
items?: TabItem[];
variant?: "pill" | "underline";
}) {
const [active, setActive] = useState(items[0].key);
return (
);
}
const meta: Meta = {
title: "Primitives/Tabs",
component: Tabs,
tags: ["autodocs"],
parameters: { layout: "padded" },
args: { variant: "pill" },
argTypes: {
variant: { control: "inline-radio", options: ["pill", "underline"] },
},
render: (args) => ,
};
export default meta;
type Story = StoryObj;
/** Flip variant in controls. */
export const Playground: Story = {};
export const WithDisabledTab: Story = {
render: () => (
),
};
export const InContext_DocumentVerticals: Story = {
render: () => (
),
};