Skip to content
Snippets Groups Projects
Select Git revision
  • 51edaa93476605d309d4d6c4b98a4289853fb42d
  • 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

composite_class_extraction_1.py

Blame
  • Window.js 1.37 KiB
    import React, { Component } from 'react';
    import PropTypes from 'prop-types';
    import ns from '../config/css-ns';
    import WindowTopBar from '../containers/WindowTopBar';
    import WindowMiddleContent from '../containers/WindowMiddleContent';
    import ThumbnailNavigation from '../containers/ThumbnailNavigation';
    
    /**
     * Represents a Window in the mirador workspace
     * @param {object} window
     */
    export class Window extends Component {
      /**
       * Renders things
       */
      render() {
        const { manifest, window, layout } = this.props;
        if (!window) return <></>;
    
        return (
          <div id={window.id} className={ns('window')}>
            <WindowTopBar
              layout={layout}
              windowId={window.id}
              manifest={manifest}
            />
            <WindowMiddleContent
              window={window}
              manifest={manifest}
              sideBarOpen={window.sideBarOpen}
            />
            <div className={ns('companion-bottom')}>
              <ThumbnailNavigation
                window={window}
                manifest={manifest}
              />
            </div>
          </div>
        );
      }
    }
    
    Window.propTypes = {
      window: PropTypes.object, // eslint-disable-line react/forbid-prop-types
      manifest: PropTypes.object, // eslint-disable-line react/forbid-prop-types
      layout: PropTypes.object, // eslint-disable-line react/forbid-prop-types
    };
    
    Window.defaultProps = {
      window: null,
      manifest: null,
      layout: null,
    };