16 changed files with 194 additions and 36 deletions
@ -0,0 +1,9 @@
@@ -0,0 +1,9 @@
|
||||
import { Follower } from '../interfaces/follower'; |
||||
|
||||
interface Props { |
||||
follower: Follower; |
||||
} |
||||
|
||||
export default function FollowerCollection(props: Props) { |
||||
return <div>This is a single follower</div>; |
||||
} |
@ -0,0 +1,9 @@
@@ -0,0 +1,9 @@
|
||||
import { Follower } from '../interfaces/follower'; |
||||
|
||||
interface Props { |
||||
followers: Follower[]; |
||||
} |
||||
|
||||
export default function FollowerCollection(props: Props) { |
||||
return <div>List of followers go here</div>; |
||||
} |
@ -1,13 +1,9 @@
@@ -1,13 +1,9 @@
|
||||
import { useRecoilValue } from 'recoil'; |
||||
import { clientConfigState } from '../../stores/ClientConfigStore'; |
||||
import { ClientConfig } from '../../../interfaces/client-config.model'; |
||||
import { Layout } from 'antd'; |
||||
|
||||
const { Footer } = Layout; |
||||
|
||||
export default function FooterComponent() { |
||||
const clientConfig = useRecoilValue<ClientConfig>(clientConfigState); |
||||
const { version } = clientConfig; |
||||
export default function FooterComponent(props) { |
||||
const { version } = props; |
||||
|
||||
return <Footer style={{ textAlign: 'center' }}>Footer: Owncast {version}</Footer>; |
||||
} |
||||
|
@ -1,31 +1,17 @@
@@ -1,31 +1,17 @@
|
||||
import s from './Header.module.scss'; |
||||
import { Layout } from 'antd'; |
||||
import { ServerStatusStore, serverStatusState } from '../../stores/ServerStatusStore'; |
||||
import { |
||||
ClientConfigStore, |
||||
clientConfigState, |
||||
chatCurrentlyVisible, |
||||
} from '../../stores/ClientConfigStore'; |
||||
import { ClientConfig } from '../../../interfaces/client-config.model'; |
||||
import { useRecoilState, useRecoilValue } from 'recoil'; |
||||
import { useEffect } from 'react'; |
||||
import UserDropdown from '../../UserDropdownMenu'; |
||||
import s from './Header.module.scss'; |
||||
|
||||
const { Header } = Layout; |
||||
|
||||
export default function HeaderComponent() { |
||||
const clientConfig = useRecoilValue<ClientConfig>(clientConfigState); |
||||
const [chatOpen, setChatOpen] = useRecoilState(chatCurrentlyVisible); |
||||
|
||||
const { name } = clientConfig; |
||||
|
||||
useEffect(() => { |
||||
console.log({ chatOpen }); |
||||
}, [chatOpen]); |
||||
export default function HeaderComponent(props) { |
||||
const { name } = props; |
||||
|
||||
return ( |
||||
<Header className={`${s.header}`}> |
||||
Logo goes here |
||||
{name} |
||||
<button onClick={() => setChatOpen(!chatOpen)}>Toggle Chat</button> |
||||
<UserDropdown /> |
||||
</Header> |
||||
); |
||||
} |
||||
|
@ -0,0 +1,7 @@
@@ -0,0 +1,7 @@
|
||||
export interface Follower { |
||||
name: string; |
||||
description?: string; |
||||
username?: string; |
||||
image?: string; |
||||
link: string; |
||||
} |
@ -0,0 +1,22 @@
@@ -0,0 +1,22 @@
|
||||
import React from 'react'; |
||||
import { ComponentStory, ComponentMeta } from '@storybook/react'; |
||||
import * as FollowerComponent from '../components/Follower'; |
||||
|
||||
export default { |
||||
title: 'owncast/Follower', |
||||
component: FollowerComponent, |
||||
parameters: {}, |
||||
} as ComponentMeta<typeof FollowerComponent>; |
||||
|
||||
const Template: ComponentStory<typeof FollowerComponent> = args => <FollowerComponent {...args} />; |
||||
|
||||
export const Example = Template.bind({}); |
||||
Example.args = { |
||||
follower: { |
||||
name: 'John Doe', |
||||
description: 'User', |
||||
username: '@account@domain.tld', |
||||
image: 'https://avatars0.githubusercontent.com/u/1234?s=460&v=4', |
||||
link: 'https://yahoo.com', |
||||
}, |
||||
}; |
@ -0,0 +1,61 @@
@@ -0,0 +1,61 @@
|
||||
import React from 'react'; |
||||
import { ComponentStory, ComponentMeta } from '@storybook/react'; |
||||
import FollowerCollection from '../components/FollowersCollection'; |
||||
|
||||
export default { |
||||
title: 'owncast/Follower collection', |
||||
component: FollowerCollection, |
||||
parameters: {}, |
||||
} as ComponentMeta<typeof FollowerCollection>; |
||||
|
||||
const Template: ComponentStory<typeof FollowerCollection> = args => ( |
||||
<FollowerCollection {...args} /> |
||||
); |
||||
|
||||
export const Example = Template.bind({}); |
||||
Example.args = { |
||||
followers: [ |
||||
{ |
||||
name: 'John Doe', |
||||
description: 'User', |
||||
username: '@account@domain.tld', |
||||
image: 'https://avatars0.githubusercontent.com/u/1234?s=460&v=4', |
||||
link: 'https://yahoo.com', |
||||
}, |
||||
{ |
||||
name: 'John Doe', |
||||
description: 'User', |
||||
username: '@account@domain.tld', |
||||
image: 'https://avatars0.githubusercontent.com/u/1234?s=460&v=4', |
||||
link: 'https://yahoo.com', |
||||
}, |
||||
{ |
||||
name: 'John Doe', |
||||
description: 'User', |
||||
username: '@account@domain.tld', |
||||
image: 'https://avatars0.githubusercontent.com/u/1234?s=460&v=4', |
||||
link: 'https://yahoo.com', |
||||
}, |
||||
{ |
||||
name: 'John Doe', |
||||
description: 'User', |
||||
username: '@account@domain.tld', |
||||
image: 'https://avatars0.githubusercontent.com/u/1234?s=460&v=4', |
||||
link: 'https://yahoo.com', |
||||
}, |
||||
{ |
||||
name: 'John Doe', |
||||
description: 'User', |
||||
username: '@account@domain.tld', |
||||
image: 'https://avatars0.githubusercontent.com/u/1234?s=460&v=4', |
||||
link: 'https://yahoo.com', |
||||
}, |
||||
{ |
||||
name: 'John Doe', |
||||
description: 'User', |
||||
username: '@account@domain.tld', |
||||
image: 'https://avatars0.githubusercontent.com/u/1234?s=460&v=4', |
||||
link: 'https://yahoo.com', |
||||
}, |
||||
], |
||||
}; |
@ -0,0 +1,18 @@
@@ -0,0 +1,18 @@
|
||||
import React from 'react'; |
||||
import { ComponentStory, ComponentMeta } from '@storybook/react'; |
||||
import Footer from '../components/ui/Footer/Footer'; |
||||
|
||||
export default { |
||||
title: 'owncast/Footer', |
||||
component: Footer, |
||||
parameters: {}, |
||||
} as ComponentMeta<typeof Footer>; |
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-Footer
|
||||
const Template: ComponentStory<typeof Footer> = args => <Footer {...args} />; |
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export const Example = Template.bind({}); |
||||
Example.args = { |
||||
version: 'v1.2.3', |
||||
}; |
@ -0,0 +1,16 @@
@@ -0,0 +1,16 @@
|
||||
import React from 'react'; |
||||
import { ComponentStory, ComponentMeta } from '@storybook/react'; |
||||
import Header from '../components/ui/Header/Header'; |
||||
|
||||
export default { |
||||
title: 'owncast/Header', |
||||
component: Header, |
||||
parameters: {}, |
||||
} as ComponentMeta<typeof Header>; |
||||
|
||||
const Template: ComponentStory<typeof Header> = args => <Header {...args} />; |
||||
|
||||
export const Example = Template.bind({}); |
||||
Example.args = { |
||||
name: 'Example Stream Name', |
||||
}; |
Loading…
Reference in new issue