UNPKG

@bbc/react-transcript-editor

Version:

A React component to make transcribing audio and video easier and faster.

15 lines (12 loc) 396 B
import React, { PureComponent } from 'react'; class Word extends PureComponent { render() { const data = this.props.entityKey ? this.props.contentState.getEntity(this.props.entityKey).getData() : {}; return React.createElement("span", { "data-start": data.start, "data-entity-key": data.key, className: "Word" }, this.props.children); } } export default Word;