summaryrefslogtreecommitdiffhomepage
path: root/app/components/WindowChrome.js
blob: 16bdb70e283e00ccc98e45a52137ba81ad76ff5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import React, { Component } from 'react';
import PropTypes from 'prop-types';

/**
 * A component used to chip out arrow in the app header using CSS mask
 *
 * @export
 * @class WindowChrome
 * @extends {Component}
 */
export default class WindowChrome extends Component {
  static propTypes = {
    children: PropTypes.oneOfType([
      PropTypes.arrayOf(PropTypes.element),
      PropTypes.element,
    ])
  };

  render() {
    const chromeClass = ['window-chrome', 'window-chrome--' + process.platform];
    return (
      <div className={ chromeClass.join(' ') }>
        { this.props.children }
      </div>
    );
  }
}