owncast/web/stories/StatusBar.stories.tsx
2022-05-12 17:59:40 -07:00

25 lines
680 B
TypeScript

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