Files
owncast/web/components/chat/ChatUserBadge/ChatUserBadge.stories.tsx
Gabe Kangas cc9286416c Update storybook to v9 (#4645)
* chore: Update storybook to v9

* Pin next-export-i18n + remove outdated mock library

* Replace old mocking library with MSW

* Resolve knip unused code warnings
2025-10-20 21:26:32 -07:00

56 lines
1.2 KiB
TypeScript

import { StoryFn, Meta } from '@storybook/nextjs';
import { ChatUserBadge } from './ChatUserBadge';
import { ModerationBadge } from './ModerationBadge';
import { AuthedUserBadge } from './AuthedUserBadge';
import { BotUserBadge } from './BotUserBadge';
const meta = {
title: 'owncast/Chat/Messages/User Flag',
component: ChatUserBadge,
argTypes: {
userColor: {
options: ['0', '1', '2', '3', '4', '5', '6', '7'],
control: { type: 'select' },
},
},
} satisfies Meta<typeof ChatUserBadge>;
export default meta;
const ModerationTemplate: StoryFn<typeof ModerationBadge> = args => <ModerationBadge {...args} />;
const AuthedTemplate: StoryFn<typeof ModerationBadge> = args => <AuthedUserBadge {...args} />;
const BotTemplate: StoryFn<typeof BotUserBadge> = args => <BotUserBadge {...args} />;
export const Authenticated = {
render: AuthedTemplate,
args: {
userColor: '3',
},
};
export const Moderator = {
render: ModerationTemplate,
args: {
userColor: '5',
},
};
export const Bot = {
render: BotTemplate,
args: {
userColor: '7',
},
};
export const Generic = {
args: {
badge: '?',
userColor: '6',
},
};