veza/apps/web/src/features/settings/components/NotificationSettings.stories.tsx

40 lines
1 KiB
TypeScript
Raw Normal View History

import type { Meta, StoryObj } from '@storybook/react';
import { NotificationSettings } from './NotificationSettings';
2026-02-03 08:56:11 +00:00
const mockNotifications = {
email_notifications: true,
push_notifications: false,
browser_notifications: true,
email_on_follow: true,
2026-02-03 08:56:11 +00:00
email_on_like: true,
email_on_comment: false,
email_on_message: true,
email_on_mention: true,
email_marketing: false,
};
const meta = {
title: 'Components/Features/Settings/NotificationSettings',
component: NotificationSettings,
tags: ['autodocs'],
2026-02-03 08:56:11 +00:00
argTypes: {
onChange: { action: 'notifications changed' }
},
decorators: [
(Story) => (
2026-02-03 08:56:11 +00:00
<div className="max-w-xl mx-auto p-6 border rounded-lg bg-white dark:bg-kodo-ink dark:text-white">
<Story />
</div>
),
],
} satisfies Meta<typeof NotificationSettings>;
export default meta;
type Story = StoryObj<typeof meta>;
export const Default: Story = {
2026-02-03 08:56:11 +00:00
args: {
notifications: mockNotifications,
},
};