2022-04-28 09:19:20 +03:00
|
|
|
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';
|
2022-04-28 09:19:20 +03:00
|
|
|
|
|
|
|
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,
|
2022-04-28 09:19:20 +03:00
|
|
|
parameters: {},
|
2022-05-08 02:13:06 +03:00
|
|
|
} as ComponentMeta<typeof Statusbar>;
|
2022-04-28 09:19:20 +03:00
|
|
|
|
2022-05-08 02:13:06 +03:00
|
|
|
const Template: ComponentStory<typeof Statusbar> = args => <Statusbar {...args} />;
|
2022-04-28 09:19:20 +03:00
|
|
|
|
|
|
|
export const Online = Template.bind({});
|
|
|
|
Online.args = {
|
|
|
|
online: true,
|
2022-05-08 02:13:06 +03:00
|
|
|
viewerCount: 42,
|
|
|
|
lastConnectTime: subHours(new Date(), 3),
|
2022-04-28 09:19:20 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
export const Offline = Template.bind({});
|
|
|
|
Offline.args = {
|
|
|
|
online: false,
|
2022-05-08 02:13:06 +03:00
|
|
|
lastDisconnectTime: subHours(new Date(), 3),
|
2022-04-28 09:19:20 +03:00
|
|
|
};
|