- Bulk replace text-white → text-foreground across 116 component files (preserving text-white/ opacity variants) - Remove hover-glow-cyan, shadow-card-glow-cyan, shadow-button-primary-glow classes from all components - Replace --duration-normal/--duration-immersive/--duration-slow with --sumi-duration-normal/--sumi-duration-slow across 130+ files - Replace --ease-out/--ease-in-out with --sumi-ease-out/--sumi-ease-in-out - Replace focus:ring-blue-500 → focus:ring-primary (4 files) - Remove hover:scale-105/110 and hover:-translate-y-1/0.5 transforms (SUMI anti-pattern: no scale on hover) - Clean up stale kodo- references in comments Co-authored-by: Cursor <cursoragent@cursor.com>
55 lines
1.2 KiB
TypeScript
55 lines
1.2 KiB
TypeScript
import type { Meta, StoryObj } from '@storybook/react';
|
|
import { Switch } from './switch';
|
|
|
|
const meta = {
|
|
title: 'UI/Switch',
|
|
component: Switch,
|
|
tags: ['autodocs'],
|
|
argTypes: {
|
|
checked: { control: 'boolean' },
|
|
disabled: { control: 'boolean' },
|
|
},
|
|
args: {
|
|
onCheckedChange: () => { },
|
|
}
|
|
} satisfies Meta<typeof Switch>;
|
|
|
|
export default meta;
|
|
type Story = StoryObj<typeof meta>;
|
|
|
|
export const Default: Story = {
|
|
args: {
|
|
checked: false,
|
|
},
|
|
};
|
|
|
|
export const Checked: Story = {
|
|
args: {
|
|
checked: true,
|
|
},
|
|
};
|
|
|
|
export const Disabled: Story = {
|
|
args: {
|
|
disabled: true,
|
|
checked: false,
|
|
},
|
|
};
|
|
|
|
export const DisabledChecked: Story = {
|
|
args: {
|
|
disabled: true,
|
|
checked: true,
|
|
},
|
|
};
|
|
|
|
export const WithLabel: Story = {
|
|
render: (args) => (
|
|
<div className="flex items-center space-x-2">
|
|
<Switch id="airplane-mode" {...args} />
|
|
<label htmlFor="airplane-mode" className="text-sm font-medium leading-none text-foreground peer-disabled:cursor-not-allowed peer-disabled:opacity-70">
|
|
Airplane Mode
|
|
</label>
|
|
</div>
|
|
),
|
|
};
|