import React from 'react'
/**
* An video embed component.
*
* @type {Component}
*/
class Video extends React.Component {
/**
* When the input text changes, update the `video` data on the node.
*
* @param {Event} e
*/
onChange = e => {
const video = e.target.value
const { node, editor } = this.props
editor.change(c => c.setNodeByKey(node.key, { data: { video } }))
}
/**
* When clicks happen in the input, stop propagation so that the void node
* itself isn't focused, since that would unfocus the input.
*
* @type {Event} e
*/
onClick = e => {
e.stopPropagation()
}
/**
* Render.
*
* @return {Element}
*/
render() {
const { isSelected } = this.props
return (