feat(web): ThemeSwitch icon segmented control + theme.* i18n (#59)

This commit is contained in:
2026-06-07 16:33:16 +02:00
parent d452dd9b35
commit 6d17e5f84d
5 changed files with 122 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
import type { Meta, StoryObj } from '@storybook/react-vite'
import { expect } from 'storybook/test'
import { ThemeSwitch } from './theme-switch'
const meta = {
component: ThemeSwitch,
tags: ['ai-generated'],
} satisfies Meta<typeof ThemeSwitch>
export default meta
type Story = StoryObj<typeof meta>
export const Default: Story = {
play: async ({ canvas }) => {
await expect(canvas.getByRole('button', { name: /light/i })).toBeInTheDocument()
await expect(canvas.getByRole('button', { name: /dark/i })).toBeInTheDocument()
await expect(canvas.getByRole('button', { name: /system/i })).toBeInTheDocument()
},
}