mirror of
https://github.com/owncast/owncast.git
synced 2024-11-25 14:20:54 +03:00
32 lines
910 B
TypeScript
32 lines
910 B
TypeScript
import React from 'react';
|
|
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
import { RecoilRoot } from 'recoil';
|
|
import { UserDropdown } from '../components/common';
|
|
import { ChatState } from '../interfaces/application-state';
|
|
|
|
export default {
|
|
title: 'owncast/Components/User settings menu',
|
|
component: UserDropdown,
|
|
parameters: {},
|
|
} as ComponentMeta<typeof UserDropdown>;
|
|
|
|
// This component uses Recoil internally so wrap it in a RecoilRoot.
|
|
const Example = args => (
|
|
<RecoilRoot>
|
|
<UserDropdown {...args} />
|
|
</RecoilRoot>
|
|
);
|
|
|
|
const Template: ComponentStory<typeof UserDropdown> = args => <Example {...args} />;
|
|
|
|
export const ChatEnabled = Template.bind({});
|
|
ChatEnabled.args = {
|
|
username: 'test-user',
|
|
chatState: ChatState.Available,
|
|
};
|
|
|
|
export const ChatDisabled = Template.bind({});
|
|
ChatDisabled.args = {
|
|
username: 'test-user',
|
|
chatState: ChatState.NotAvailable,
|
|
};
|