4f078e1ee4
* Migrate web action-buttons directory to CSF3 notation * Migrate web chat directory to CSF3 notation * Migrate web common directory to CSF3 notation * Migrate web layout directory to CSF3 notation * Migrate web modals directory to CSF3 notation * Migrate web ui directory to CSF3 notation * Migrate web video directory to CSF3 notation * Migrate web stories directory to CSF3 notation
56 lines
1.2 KiB
TypeScript
56 lines
1.2 KiB
TypeScript
import { StoryFn, Meta } from '@storybook/react';
|
|
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',
|
|
},
|
|
};
|