blob: 9302ba47488b8ac5e1bf3b836b33e637b1841f0d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
import React, { Component } from 'react'
import { Select } from '../../../../../common'
export const AnnotationFormVideo = ({ annotation, media, handleSettingsSelect }) => {
if (!media.lookup) return <div />
const { lookup, order } = media
const video_list_items = order.filter(id => lookup[id].type === 'video').map(id => {
const video = lookup[id]
return {
name: video.id,
label: video.author + ' - ' + video.title
}
})
return (
<div>
<Select
name='media_id'
className="media_id"
selected={annotation.settings.media_id}
options={video_list_items}
defaultOption='Choose a video'
onChange={handleSettingsSelect}
/>
</div>
)
}
|