mirror of
https://github.com/owncast/owncast.git
synced 2024-11-29 11:39:08 +03:00
42 lines
847 B
TypeScript
42 lines
847 B
TypeScript
import { Meta } from '@storybook/react';
|
|
import { subHours, subMinutes, subSeconds } from 'date-fns';
|
|
import { Statusbar } from './Statusbar';
|
|
|
|
const meta = {
|
|
title: 'owncast/Player/Status bar',
|
|
component: Statusbar,
|
|
parameters: {},
|
|
} satisfies Meta<typeof Statusbar>;
|
|
|
|
export default meta;
|
|
|
|
export const Online = {
|
|
args: {
|
|
online: true,
|
|
viewerCount: 42,
|
|
lastConnectTime: subSeconds(subMinutes(subHours(new Date(), 3), 17), 22),
|
|
},
|
|
};
|
|
|
|
export const Minutes = {
|
|
args: {
|
|
online: true,
|
|
viewerCount: 42,
|
|
lastConnectTime: subSeconds(subMinutes(new Date(), 17), 22),
|
|
},
|
|
};
|
|
|
|
export const DaysAgo = {
|
|
args: {
|
|
online: true,
|
|
viewerCount: 42,
|
|
lastConnectTime: subHours(new Date(), 17),
|
|
},
|
|
};
|
|
|
|
export const Offline = {
|
|
args: {
|
|
online: false,
|
|
lastDisconnectTime: subHours(new Date(), 3),
|
|
},
|
|
};
|