2022-04-28 09:19:20 +03:00
|
|
|
import React from 'react';
|
|
|
|
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
2022-04-30 01:09:53 +03:00
|
|
|
import { RecoilRoot } from 'recoil';
|
2022-05-08 10:41:47 +03:00
|
|
|
import { UserDropdown } from '../components/common';
|
2022-04-28 09:19:20 +03:00
|
|
|
|
|
|
|
export default {
|
2022-05-18 00:24:48 +03:00
|
|
|
title: 'owncast/Components/User settings menu',
|
2022-05-08 10:41:47 +03:00
|
|
|
component: UserDropdown,
|
2022-04-28 09:19:20 +03:00
|
|
|
parameters: {},
|
2022-05-08 10:41:47 +03:00
|
|
|
} as ComponentMeta<typeof UserDropdown>;
|
2022-04-28 09:19:20 +03:00
|
|
|
|
2022-04-30 01:09:53 +03:00
|
|
|
// This component uses Recoil internally so wrap it in a RecoilRoot.
|
|
|
|
const Example = args => (
|
|
|
|
<RecoilRoot>
|
2022-05-08 10:41:47 +03:00
|
|
|
<UserDropdown {...args} />
|
2022-04-30 01:09:53 +03:00
|
|
|
</RecoilRoot>
|
|
|
|
);
|
2022-04-28 09:19:20 +03:00
|
|
|
|
2022-05-08 10:41:47 +03:00
|
|
|
const Template: ComponentStory<typeof UserDropdown> = args => <Example {...args} />;
|
2022-04-30 01:09:53 +03:00
|
|
|
|
|
|
|
export const ChatEnabled = Template.bind({});
|
|
|
|
ChatEnabled.args = {
|
|
|
|
username: 'test-user',
|
|
|
|
};
|
|
|
|
|
|
|
|
export const ChatDisabled = Template.bind({});
|
|
|
|
ChatDisabled.args = {
|
|
|
|
username: 'test-user',
|
|
|
|
};
|