summaryrefslogtreecommitdiffhomepage
path: root/app/components/WindowChrome.js
blob: e1df040d6c350787f4d0f2eab959f579b64cee83 (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
import React, { Component, PropTypes } from 'react';

/**
 * 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>
    );
  }
}