import type { Meta, StoryFn } from '@storybook/react'; import { usePropState } from '@anton.bobrov/react-hooks'; import React from 'react'; import { BaseVideo } from '.'; type TComponent = typeof BaseVideo; const meta: Meta = { title: 'Video/BaseVideo', component: BaseVideo, tags: ['autodocs'], args: { width: 300, autoPlay: true, controls: true, muted: true, }, }; export default meta; const Template: StoryFn = ({ isPlaying: isPlayingProp, ...props }) => { const [isPlaying, setIsPlaying] = usePropState(isPlayingProp); return ( <>
); }; export const Default = Template.bind({}); Default.args = { src: './video/video.mp4', isPlaying: true, };