owncast/web/stories/StatusBar.stories.tsx

26 lines
680 B
TypeScript
Raw Normal View History

import React from 'react';
import { ComponentStory, ComponentMeta } from '@storybook/react';
2022-05-08 02:13:06 +03:00
import { subHours } from 'date-fns';
import Statusbar from '../components/ui/Statusbar/Statusbar';
export default {
2022-05-13 03:59:40 +03:00
title: 'owncast/Player/Status bar',
2022-05-08 02:13:06 +03:00
component: Statusbar,
parameters: {},
2022-05-08 02:13:06 +03:00
} as ComponentMeta<typeof Statusbar>;
2022-05-08 02:13:06 +03:00
const Template: ComponentStory<typeof Statusbar> = args => <Statusbar {...args} />;
export const Online = Template.bind({});
Online.args = {
online: true,
2022-05-08 02:13:06 +03:00
viewerCount: 42,
lastConnectTime: subHours(new Date(), 3),
};
export const Offline = Template.bind({});
Offline.args = {
online: false,
2022-05-08 02:13:06 +03:00
lastDisconnectTime: subHours(new Date(), 3),
};