tpmjs/packages/storybook/stories/Badge.stories.ts
Ajax Davis e95bea6847 fix(lint): configure Biome to properly ignore build directories
- Add root biome.json that extends packages/config/biome.json
- Add explicit ignore patterns for dist/, build/, .next/, .turbo/, etc.
- Make a11y lints warnings instead of errors (non-blocking)
- Remove invalid biome-ignore comment from Section.tsx
- Apply formatting to all source files (155 files checked, 129 fixed)

This fixes the CI format check that was failing with 2064+ errors
because Biome was checking generated files in dist/ and .turbo/.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 22:49:45 +10:00

53 lines
1.5 KiB
TypeScript

import type { Meta, StoryObj } from '@storybook/react';
import { Badge } from '@tpmjs/ui/Badge/Badge';
import { createElement } from 'react';
const meta = {
title: 'Components/Badge',
component: Badge,
tags: ['autodocs'],
parameters: {
layout: 'centered',
},
} satisfies Meta<typeof Badge>;
export default meta;
type Story = StoryObj<typeof meta>;
export const Default: Story = {
render: () => createElement(Badge, {}, 'Default'),
};
export const AllVariants: Story = {
render: () =>
createElement(
'div',
{
className: 'flex flex-wrap items-center gap-3',
},
createElement(Badge, { variant: 'default' }, 'Default'),
createElement(Badge, { variant: 'secondary' }, 'Secondary'),
createElement(Badge, { variant: 'outline' }, 'Outline'),
createElement(Badge, { variant: 'success' }, 'Success'),
createElement(Badge, { variant: 'error' }, 'Error'),
createElement(Badge, { variant: 'warning' }, 'Warning'),
createElement(Badge, { variant: 'info' }, 'Info')
),
};
export const AllSizes: Story = {
render: () =>
createElement(
'div',
{
className: 'flex items-center gap-3',
},
createElement(Badge, { size: 'sm' }, 'Small'),
createElement(Badge, { size: 'md' }, 'Medium'),
createElement(Badge, { size: 'lg' }, 'Large')
),
};
export const WithLongText: Story = {
render: () => createElement(Badge, {}, 'This is a very long badge with lots of text'),
};