Skip to content
Snippets Groups Projects
Select Git revision
  • 58deb43d6e66f248a8aac1b744a113cc896ecaec
  • master default protected
  • multiprocessing
  • experiment/clara
  • experiment/spec2B-poc
  • experiment/qivalio-poc
  • experiment/ertms
  • MAY-2023
  • FEB-2023
  • EGC-2023
  • 0.2.1
  • v0.2.0
  • v0.1.2
13 results

phenomena_application.py

Blame
  • AttributionPanel.js 1.29 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 {
      getManifestLogo,
      getRequiredStatement,
      getRights,
    } from '../state/selectors';
    import { AttributionPanel } from '../components/AttributionPanel';
    
    /**
     * mapStateToProps - to hook up connect
     * @memberof WindowSideBarInfoPanel
     * @private
     */
    const mapStateToProps = (state, { id, windowId }) => ({
      manifestLogo: getManifestLogo(state, { windowId }),
      requiredStatement: getRequiredStatement(state, { windowId }),
      rights: getRights(state, { windowId }),
    });
    
    /**
     *
     * @param theme
     * @returns {label: {paddingLeft: number}}}
     */
    const styles = theme => ({
      logo: {
        maxWidth: '100%',
      },
      placeholder: {
        backgroundColor: theme.palette.grey[300],
      },
      section: {
        borderBottom: `.5px solid ${theme.palette.section_divider}`,
        paddingBottom: theme.spacing(1),
        paddingLeft: theme.spacing(2),
        paddingRight: theme.spacing(1),
        paddingTop: theme.spacing(2),
      },
    });
    
    const enhance = compose(
      withStyles(styles),
      withTranslation(),
      connect(mapStateToProps),
      withPlugins('AttributionPanel'),
    );
    
    export default enhance(AttributionPanel);