Select Git revision
WindowTopBarPluginMenu.js
WindowTopBarPluginMenu.js 913 B
import { compose } from 'redux';
import { connect } from 'react-redux';
import { withTranslation } from 'react-i18next';
import { withStyles } from '@material-ui/core';
import { withPlugins } from '../extend/withPlugins';
import { WindowTopBarPluginMenu } from '../components/WindowTopBarPluginMenu';
import { getContainerId } from '../state/selectors';
/**
* mapStateToProps - to hook up connect
* @memberof WindowTopBarPluginMenu
* @private
*/
const mapStateToProps = state => ({
containerId: getContainerId(state),
});
/**
*
* @param theme
* @returns {{ctrlBtn: {margin: (number|string)}}}
*/
const styles = theme => ({
ctrlBtnSelected: {
backgroundColor: theme.palette.action.selected,
},
});
const enhance = compose(
withTranslation(),
withStyles(styles),
connect(mapStateToProps, null),
withPlugins('WindowTopBarPluginMenu'),
);
export default enhance(WindowTopBarPluginMenu);