MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-

View on GitHub
src/renderer/ui/components/modals/ThemedDialog.js

Summary

Maintainability
A
0 mins
Test Coverage
import React, { Component, PropTypes } from 'react';
import Dialog from 'material-ui/Dialog';

export default class ThemedDialog extends Component {
  static propTypes = {
    children: PropTypes.oneOfType([
      PropTypes.array,
      PropTypes.object,
      PropTypes.string,
    ]).isRequired,
  };

  static contextTypes = {
    muiTheme: PropTypes.object.isRequired,
  };

  render() {
    return (
      <Dialog
        modal
        {...this.props}
        autoScrollBodyContent
        actionsContainerStyle={{ backgroundColor: this.context.muiTheme.dialog.backgroundColor, borderTop: 0 }}
        bodyStyle={{ backgroundColor: this.context.muiTheme.dialog.backgroundColor }}
        titleStyle={{ backgroundColor: this.context.muiTheme.dialog.backgroundColor }}
      >
        {
          this.props.children
        }
      </Dialog>
    );
  }
}