2017-02-28 16:13:27 +13:00
|
|
|
|
|
|
|
|
import React, { PropTypes } from 'react'
|
|
|
|
|
import FontAwesome from 'react-fontawesome'
|
|
|
|
|
|
|
|
|
|
export default class ContextMenuTrigger extends React.Component{
|
|
|
|
|
|
2017-10-10 13:05:28 +13:00
|
|
|
constructor(props){
|
2017-02-28 16:13:27 +13:00
|
|
|
super(props);
|
|
|
|
|
}
|
|
|
|
|
|
2017-12-08 16:11:15 +13:00
|
|
|
handleClick(e){
|
2017-11-20 15:49:52 +13:00
|
|
|
e.preventDefault();
|
|
|
|
|
e.stopPropagation();
|
2017-11-20 09:05:27 +13:00
|
|
|
this.props.onTrigger(e);
|
|
|
|
|
}
|
|
|
|
|
|
2017-02-28 16:13:27 +13:00
|
|
|
render(){
|
2017-12-05 16:27:45 +13:00
|
|
|
var className = 'context-menu-trigger mouse-contextable touch-contextable'
|
2017-02-28 16:13:27 +13:00
|
|
|
if (this.props.className){
|
|
|
|
|
className += ' '+this.props.className
|
|
|
|
|
}
|
|
|
|
|
return (
|
2017-12-08 10:36:31 +13:00
|
|
|
<span
|
|
|
|
|
className={className}
|
2017-12-08 16:11:15 +13:00
|
|
|
onClick={e => this.handleClick(e)}>
|
2017-11-18 08:15:06 +13:00
|
|
|
<span className="dot"></span>
|
|
|
|
|
<span className="dot"></span>
|
|
|
|
|
<span className="dot"></span>
|
2017-06-19 07:38:23 +12:00
|
|
|
</span>
|
2017-02-28 16:13:27 +13:00
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|