react-toolbox-build4server
Version:
Builds react-toolbox in such a way that it's components can be required and used in node - most likely for server-side rendered webapps - without having to depend on webpack to build your entire server-side project
23 lines (18 loc) • 518 B
JavaScript
import React, { PropTypes } from 'react';
import style from './style';
const ListItemAction = ({action}) => {
const {onClick, onMouseDown} = action.props;
const stopRipple = onClick && !onMouseDown;
const stop = e => e.stopPropagation();
return (
<span className={style.itemAction} onMouseDown={stopRipple && stop} onClick={onClick && stop}>
{action}
</span>
);
};
ListItemAction.propTypes = {
action: PropTypes.object
};
ListItemAction.defaultProps = {
};
export default ListItemAction;