Skip to content
Snippets Groups Projects
Select Git revision
  • aa1133ece80779e94685dc6017426e8f33fee034
  • main default
  • 35-cgu
  • 34-peertube-support
  • 27-add-autoplay-to-iframe
  • 33-bug-on-youtube-embed-urls
  • RC-Rekall-v1.1-fix_lpo
  • tuleap-140-go-back-to-my-capsules-page-when-i-m-on-capsule-preview-page
  • RC-Rekall-v1.2-fix10
  • RC-Rekall-v1.2-fix9
  • RC-Rekall-v1.2-fix8
  • RC-Rekall-v1.2-fix7
  • RC-Rekall-v1.2-fix6
  • RC-Rekall-v1.2-fix5
  • RC-Rekall-v1.2-fix4
  • RC-Rekall-v1.2-fix3
  • RC-Rekall-v1.2-fix2
  • RC-Rekall-v1.2-fix1
  • RC-Rekall-v1.1-fix-3
  • RC-Rekall-v1.1-fix-2
  • RC-Rekall-v1.1-fix-1
  • RC-Rekall-v1.1-delivered
  • preprod20220209-1535
23 results

index.html

Blame
  • ThumbnailCanvasGrouping.js 1.59 KiB
    import { compose } from 'redux';
    import { connect } from 'react-redux';
    import { withTranslation } from 'react-i18next';
    import { withStyles } from '@material-ui/core/styles';
    import { withPlugins } from '../extend/withPlugins';
    import * as actions from '../state/actions';
    import { getCurrentCanvas } from '../state/selectors';
    import { ThumbnailCanvasGrouping } from '../components/ThumbnailCanvasGrouping';
    
    /**
     * mapDispatchToProps - used to hook up connect to action creators
     * @memberof ThumbnailCanvasGrouping
     * @private
     */
    const mapDispatchToProps = (dispatch, { data }) => ({
      setCanvas: (...args) => dispatch(actions.setCanvas(data.windowId, ...args)),
    });
    
    /**
     * mapStateToProps - used to hook up state to props
     * @memberof ThumbnailCanvasGrouping
     * @private
     */
    const mapStateToProps = (state, { data }) => ({
      currentCanvasId: (getCurrentCanvas(state, { windowId: data.windowId }) || {}).id,
    });
    
    /**
     * Styles for withStyles HOC
     */
    const styles = theme => ({
      canvas: {
        '&$currentCanvas': {
          outline: `2px solid ${theme.palette.primary.main}`,
          outlineOffset: '3px',
        },
        '&:hover': {
          outline: `9px solid ${theme.palette.action.hover}`,
          outlineOffset: '-2px',
        },
        boxSizing: 'border-box',
        color: theme.palette.common.white,
        cursor: 'pointer',
        display: 'inline-block',
        outline: 0,
        whiteSpace: 'nowrap',
      },
      currentCanvas: {
      },
    });
    
    const enhance = compose(
      withTranslation(),
      withStyles(styles),
      connect(mapStateToProps, mapDispatchToProps),
      withPlugins('ThumbnailCanvasGrouping'),
    );
    
    export default enhance(ThumbnailCanvasGrouping);