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