tpmjs/packages/storybook/stories/Button.stories.ts
Ajax Davis bc2f4a01cf feat: initial monorepo setup with Turborepo, Next.js 16, and .ts-only components
- Set up Turborepo monorepo with pnpm workspaces
- Configure shared configs (Biome, ESLint, Tailwind, TypeScript)
- Create @tpmjs/ui package with .ts-only React components (Button, Card)
- Create @tpmjs/utils package with utility functions
- Create @tpmjs/types package with Zod schemas
- Create @tpmjs/env package for environment validation
- Set up Next.js 16 App Router application
- Configure Storybook in separate package
- Add GitHub Actions CI/CD workflows
- Configure Changesets for versioning and publishing
- Set up Lefthook pre-commit hooks
- Add comprehensive documentation

Key architecture decisions:
- All React components use .ts extension with createElement (no JSX)
- No barrel exports (index.ts) - direct imports required
- Module boundaries enforced via ESLint
- tsup for package builds with ESM + types
- Tailwind CSS with shared design tokens

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 21:59:15 +10:00

69 lines
1 KiB
TypeScript

import type { Meta, StoryObj } from "@storybook/react";
import { Button } from "@tpmjs/ui/Button/Button";
const meta = {
title: "Components/Button",
component: Button,
parameters: {
layout: "centered",
},
tags: ["autodocs"],
} satisfies Meta<typeof Button>;
export default meta;
type Story = StoryObj<typeof meta>;
export const Default: Story = {
args: {
children: "Button",
},
};
export const Destructive: Story = {
args: {
variant: "destructive",
children: "Delete",
},
};
export const Outline: Story = {
args: {
variant: "outline",
children: "Outline",
},
};
export const Secondary: Story = {
args: {
variant: "secondary",
children: "Secondary",
},
};
export const Ghost: Story = {
args: {
variant: "ghost",
children: "Ghost",
},
};
export const Link: Story = {
args: {
variant: "link",
children: "Link",
},
};
export const Large: Story = {
args: {
size: "lg",
children: "Large Button",
},
};
export const Small: Story = {
args: {
size: "sm",
children: "Small Button",
},
};