import React, { Component, PropTypes } from "react";
import { RaisedButton } from "material-ui";
import UCdefaultTheme from "../../themes/DefaultTheme";
import getMuiTheme from "material-ui/styles/getMuiTheme";
import Spacing from "material-ui/styles/spacing";

export default class TGCard extends Component {
  getChildContext() {
    const theme = getMuiTheme(UCdefaultTheme);
    theme.appBar.textColor = "white";
    theme.appBar.spacing = Spacing.desktopSubheaderHeight;
    return {
      muiTheme: theme
    };
  }

  render() {
    const { tgUrl, tgText } = this.props;
    return (
      <div style={{ padding: 20 }}>
        <p>{tgText}</p>
        <div style={{ paddingTop: 20, paddingBottom: 20, textAlign: "center" }}>
          <RaisedButton
            label="View Current Cohort Details"
            labelStyle={{ fontSize: "12px" }}
            secondary
            href={tgUrl}
          />
        </div>
      </div>
    );
  }
}
TGCard.propTypes = {
  tgURL: React.PropTypes.string,
  tgText: React.PropTypes.string
};

TGCard.childContextTypes = {
  muiTheme: PropTypes.object
};
