Moved type selector widget to addons
This commit is contained in:
parent
6c2cb7d98d
commit
dcef9d5cab
|
@ -74,8 +74,6 @@ const Editor = props => {
|
|||
<div ref={element} className="r6o-editor">
|
||||
<div className="arrow" />
|
||||
<div className="inner">
|
||||
<TypeSelectorWidget />
|
||||
|
||||
<CommentWidget
|
||||
annotation={currentAnnotation}
|
||||
currentReply={currentReply}
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
import React from 'react';
|
||||
|
||||
/**
|
||||
* The basic Place/Person/Event selector from original Recogito
|
||||
*/
|
||||
const TypeSelectorWidget = props => {
|
||||
|
||||
const onSelect = type => _ => {
|
||||
props.onSelect && props.onSelect(type);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="type-selector">
|
||||
<div className="type place" onClick={onSelect('PLACE')}>
|
||||
<span className="icon">{'\uf041'}</span> Place
|
||||
</div>
|
||||
|
||||
<div className="type person" onClick={onSelect('PERSON')}>
|
||||
<span className="icon">{'\uf007'}</span> Person
|
||||
</div>
|
||||
|
||||
<div className="type event" onClick={onSelect('EVENT')}>
|
||||
<span className="icon">{'\uf005'}</span> Event
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
export default TypeSelectorWidget;
|
Loading…
Reference in New Issue