mirror of
https://github.com/owncast/owncast.git
synced 2024-11-29 11:39:08 +03:00
e50b23d081
* chore(js): be stricter about dead code warnings * chore(js): remove dead code and unused exports * rebase * chore: remove unused files * chore(deps): remove unused prop-types dep * chore(js): remove unused function * chore(deps): remove + check unused deps * chore(js): remove unused exports. Closes #3036
44 lines
1.3 KiB
TypeScript
44 lines
1.3 KiB
TypeScript
import React from 'react';
|
|
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
import { RecoilRoot } from 'recoil';
|
|
import { BrowserNotifyModal } from './BrowserNotifyModal';
|
|
import BrowserNotifyModalMock from '../../../stories/assets/mocks/notify-modal.png';
|
|
|
|
const Example = () => (
|
|
<div>
|
|
<BrowserNotifyModal />
|
|
</div>
|
|
);
|
|
|
|
export default {
|
|
title: 'owncast/Modals/Browser Notifications',
|
|
component: BrowserNotifyModal,
|
|
parameters: {
|
|
chromatic: { diffThreshold: 0.9 },
|
|
design: {
|
|
type: 'image',
|
|
url: BrowserNotifyModalMock,
|
|
scale: 0.5,
|
|
},
|
|
docs: {
|
|
description: {
|
|
component: `The notify modal allows an end user to get notified when the stream goes live via [Browser Push Notifications](https://developers.google.com/web/ilt/pwa/introduction-to-push-notifications) It must:
|
|
|
|
- Verify the browser supports notifications.
|
|
- Handle errors that come back from the server.
|
|
- Have an enabled and disabled state with accurate information about each.
|
|
`,
|
|
},
|
|
},
|
|
},
|
|
} as ComponentMeta<typeof BrowserNotifyModal>;
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
const Template: ComponentStory<typeof BrowserNotifyModal> = () => (
|
|
<RecoilRoot>
|
|
<Example />
|
|
</RecoilRoot>
|
|
);
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
export const Basic = Template.bind({});
|