mirror of
https://github.com/owncast/owncast.git
synced 2024-11-26 06:46:01 +03:00
Fire action in story when button is pressed
This commit is contained in:
parent
a75c838ef3
commit
67121426a5
1 changed files with 3 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
|||
import React from 'react';
|
||||
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
||||
import { RecoilRoot } from 'recoil';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import { FollowerCollection } from './FollowerCollection';
|
||||
|
||||
export default {
|
||||
|
@ -12,8 +13,8 @@ export default {
|
|||
const Template: ComponentStory<typeof FollowerCollection> = (args: object) => (
|
||||
<RecoilRoot>
|
||||
<FollowerCollection
|
||||
onFollowButtonClick={function (): void {
|
||||
throw new Error('Function not implemented.');
|
||||
onFollowButtonClick={() => {
|
||||
action('Follow button clicked');
|
||||
}}
|
||||
name="Example stream name"
|
||||
{...args}
|
||||
|
|
Loading…
Reference in a new issue