veza/apps/web/src/components/ui/Tabs.stories.tsx
senke 0a29c544af fix(web): resolve all 568 TypeScript errors — tsc --noEmit now passes with zero errors
Major categories fixed:
- TS6133 (188): Remove unused imports (React, icons, types) and variables
- TS2322 (222): Fix type mismatches in stories (satisfies Meta -> const meta: Meta),
  add nullish coalescing for optional values, fix component prop types
- TS2345 (43): Fix argument type mismatches with proper null checks and type narrowing
- TS2741 (21): Add missing required properties to mock/story data
- TS2339 (19): Fix property access on incorrect types, add type guards
- TS2353 (13): Remove extra properties from object literals or extend interfaces
- TS2352 (11): Fix type conversion chains
- TS2307 (9): Fix import paths and module references
- Other (42): Fix implicit any, possibly undefined, export declarations

Vite build and tsc --noEmit both pass cleanly.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 00:32:08 +01:00

38 lines
1.3 KiB
TypeScript

import type { Meta, StoryObj } from '@storybook/react';
import { Tabs, TabsList, TabsTrigger, TabsContent } from './tabs';
const meta: Meta = {
title: 'UI/Tabs',
component: Tabs,
tags: ['autodocs'],
argTypes: {
defaultValue: { control: 'text' },
},
args: {
defaultValue: 'account',
}
};
export default meta;
type Story = StoryObj<typeof meta>;
export const Default: Story = {
render: (args) => (
<Tabs {...args} className="max-w-md">
<TabsList className="grid w-full grid-cols-2">
<TabsTrigger value="account">Account</TabsTrigger>
<TabsTrigger value="password">Password</TabsTrigger>
</TabsList>
<TabsContent value="account">
<div className="p-4 bg-muted/20 rounded-lg mt-2 border border-border/50">
<p className="text-sm font-medium">Make changes to your account here.</p>
</div>
</TabsContent>
<TabsContent value="password">
<div className="p-4 bg-muted/20 rounded-lg mt-2 border border-border/50">
<p className="text-sm font-medium">Change your password here.</p>
</div>
</TabsContent>
</Tabs>
),
};