Fixes view once videos in lightbox
This commit is contained in:
parent
425404cd6e
commit
28f5a2bd1c
6 changed files with 104 additions and 67 deletions
|
@ -52,6 +52,7 @@ function createMediaItem(
|
|||
const createProps = (overrideProps: Partial<PropsType> = {}): PropsType => ({
|
||||
close: action('close'),
|
||||
i18n,
|
||||
isViewOnce: Boolean(overrideProps.isViewOnce),
|
||||
media: overrideProps.media || [],
|
||||
onSave: action('onSave'),
|
||||
selectedIndex: number('selectedIndex', overrideProps.selectedIndex || 0),
|
||||
|
@ -288,3 +289,18 @@ story.add('Conversation Header', () => (
|
|||
]}
|
||||
/>
|
||||
));
|
||||
|
||||
story.add('View Once Video', () => (
|
||||
<Lightbox
|
||||
{...createProps({
|
||||
isViewOnce: true,
|
||||
media: [
|
||||
createMediaItem({
|
||||
contentType: VIDEO_MP4,
|
||||
objectURL: '/fixtures/pixabay-Soap-Bubble-7141.mp4',
|
||||
}),
|
||||
],
|
||||
})}
|
||||
isViewOnce
|
||||
/>
|
||||
));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue