all files / ui/ SelectionFragmentComponent.js

0% Statements 0/7
0% Branches 0/2
0% Functions 0/1
0% Lines 0/7
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21                                         
import Component from './Component'
 
class SelectionFragmentComponent extends Component {
 
  render($$) {
    // TODO: we should rename se-cursor to sc-cursor
    let el = $$('span').addClass('se-selection-fragment')
    if (this.props.collaborator) {
      let collaboratorIndex = this.props.collaborator.colorIndex
      el.addClass('sm-collaborator-'+collaboratorIndex)
    } else {
      el.addClass('sm-local-user')
    }
    el.append(this.props.children)
    return el
  }
 
}
 
export default SelectionFragmentComponent