2023-11-07 04:35:05 +01:00
|
|
|
import { StoryFn, Meta } from '@storybook/react';
|
2022-09-07 09:00:28 +02:00
|
|
|
import { ChatUserBadge } from './ChatUserBadge';
|
2023-01-30 00:39:50 +01:00
|
|
|
import { ModerationBadge } from './ModerationBadge';
|
|
|
|
import { AuthedUserBadge } from './AuthedUserBadge';
|
2023-02-06 00:37:16 +01:00
|
|
|
import { BotUserBadge } from './BotUserBadge';
|
2022-08-21 23:04:16 +02:00
|
|
|
|
2023-11-07 04:35:05 +01:00
|
|
|
const meta = {
|
2022-08-21 23:04:16 +02:00
|
|
|
title: 'owncast/Chat/Messages/User Flag',
|
|
|
|
component: ChatUserBadge,
|
|
|
|
argTypes: {
|
|
|
|
userColor: {
|
|
|
|
options: ['0', '1', '2', '3', '4', '5', '6', '7'],
|
|
|
|
control: { type: 'select' },
|
|
|
|
},
|
|
|
|
},
|
2023-11-07 04:35:05 +01:00
|
|
|
} satisfies Meta<typeof ChatUserBadge>;
|
2022-08-21 23:04:16 +02:00
|
|
|
|
2023-11-07 04:35:05 +01:00
|
|
|
export default meta;
|
2022-08-21 23:04:16 +02:00
|
|
|
|
2023-11-07 04:35:05 +01:00
|
|
|
const ModerationTemplate: StoryFn<typeof ModerationBadge> = args => <ModerationBadge {...args} />;
|
2023-01-30 00:39:50 +01:00
|
|
|
|
2023-11-07 04:35:05 +01:00
|
|
|
const AuthedTemplate: StoryFn<typeof ModerationBadge> = args => <AuthedUserBadge {...args} />;
|
2023-02-06 00:37:16 +01:00
|
|
|
|
2023-11-07 04:35:05 +01:00
|
|
|
const BotTemplate: StoryFn<typeof BotUserBadge> = args => <BotUserBadge {...args} />;
|
|
|
|
|
|
|
|
export const Authenticated = {
|
|
|
|
render: AuthedTemplate,
|
|
|
|
|
|
|
|
args: {
|
|
|
|
userColor: '3',
|
|
|
|
},
|
2023-01-30 00:39:50 +01:00
|
|
|
};
|
|
|
|
|
2023-11-07 04:35:05 +01:00
|
|
|
export const Moderator = {
|
|
|
|
render: ModerationTemplate,
|
|
|
|
|
|
|
|
args: {
|
|
|
|
userColor: '5',
|
|
|
|
},
|
2022-08-21 23:04:16 +02:00
|
|
|
};
|
|
|
|
|
2023-11-07 04:35:05 +01:00
|
|
|
export const Bot = {
|
|
|
|
render: BotTemplate,
|
|
|
|
|
|
|
|
args: {
|
|
|
|
userColor: '7',
|
|
|
|
},
|
2023-02-06 00:37:16 +01:00
|
|
|
};
|
|
|
|
|
2023-11-07 04:35:05 +01:00
|
|
|
export const Generic = {
|
|
|
|
args: {
|
|
|
|
badge: '?',
|
|
|
|
userColor: '6',
|
|
|
|
},
|
2022-08-21 23:04:16 +02:00
|
|
|
};
|