Fixes view once videos in lightbox

This commit is contained in:
Josh Perez 2021-08-24 17:47:14 -04:00 committed by GitHub
parent 425404cd6e
commit 28f5a2bd1c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 104 additions and 67 deletions

View file

@ -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
/>
));