8 changed files with 53 additions and 6 deletions
@ -0,0 +1,9 @@
@@ -0,0 +1,9 @@
|
||||
// import s from './OfflineBanner.module.scss';
|
||||
|
||||
interface Props { |
||||
text: string; |
||||
} |
||||
|
||||
export default function OfflineBanner({ text }: Props) { |
||||
return <div>{text}</div>; |
||||
} |
@ -0,0 +1,33 @@
@@ -0,0 +1,33 @@
|
||||
import React from 'react'; |
||||
import { ComponentStory, ComponentMeta } from '@storybook/react'; |
||||
import OfflineBanner from '../components/ui/OfflineBanner/OfflineBanner'; |
||||
import OfflineState from './assets/mocks/offline-state.png'; |
||||
|
||||
export default { |
||||
title: 'owncast/Layout/Offline Banner', |
||||
component: OfflineBanner, |
||||
parameters: { |
||||
design: { |
||||
type: 'image', |
||||
url: OfflineState, |
||||
scale: 0.5, |
||||
}, |
||||
docs: { |
||||
description: { |
||||
component: `When the stream is offline the player should be replaced by this banner that can support custom text and notify actions.`, |
||||
}, |
||||
}, |
||||
}, |
||||
} as ComponentMeta<typeof OfflineBanner>; |
||||
|
||||
const Template: ComponentStory<typeof OfflineBanner> = args => <OfflineBanner {...args} />; |
||||
|
||||
export const ExampleDefault = Template.bind({}); |
||||
ExampleDefault.args = { |
||||
text: 'To get notifications when <server name> is back online you can follow or ask for notifications.', |
||||
}; |
||||
|
||||
export const ExampleCustom = Template.bind({}); |
||||
ExampleCustom.args = { |
||||
text: 'This is some example offline text that a streamer can leave for a visitor of the page.', |
||||
}; |
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 101 KiB |
After Width: | Height: | Size: 145 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 52 KiB |
Loading…
Reference in new issue