import React, {Component} from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import MaxBlocks from './MaxBlocks'; import Button from '@material-ui/core/Button'; import DialogTitle from '@material-ui/core/DialogTitle'; import DialogContent from '@material-ui/core/DialogContent'; import DialogActions from '@material-ui/core/DialogActions'; import Dialog from '@material-ui/core/Dialog'; class WorkspaceFunc extends Component { state={ title: '', content: '', open: false } getArdurinoCode = () => { var code = window.Ardublockly.generateArduino(); this.setState({title: 'Ardurino Code', content: code, open: true}); } getXMLCode = () => { var code = window.Ardublockly.generateXml(); this.setState({title: 'XML Code', content: code, open: true}); } toggleDialog = () => { this.setState({open: !this.state}); } render() { return (