2017-02-28 16:13:27 +13:00
|
|
|
|
|
|
|
|
import React, { PropTypes } from 'react'
|
2018-05-16 21:08:45 +12:00
|
|
|
import Icon from './Icon'
|
2017-02-28 16:13:27 +13:00
|
|
|
|
|
|
|
|
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 (
|
2018-05-16 21:08:45 +12:00
|
|
|
<span className={className} onClick={e => this.handleClick(e)}>
|
|
|
|
|
<Icon name="more_horiz" />
|
2017-06-19 07:38:23 +12:00
|
|
|
</span>
|
2017-02-28 16:13:27 +13:00
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|