diff --git a/src/App.js b/src/App.js index 67e20d0..50afe39 100644 --- a/src/App.js +++ b/src/App.js @@ -17,6 +17,7 @@ const theme = createMuiTheme({ palette: { primary: { main: '#4EAF47', + contrastText: '#ffffff' }, secondary: { main: '#DDDDDD' diff --git a/src/components/Blockly/BlocklyComponent.css b/src/components/Blockly/BlocklyComponent.css index ce2c211..acc2ee2 100644 --- a/src/components/Blockly/BlocklyComponent.css +++ b/src/components/Blockly/BlocklyComponent.css @@ -2,6 +2,6 @@ height: 100%; min-height: 700px; width: 100%; - border: 1px solid #4EAF47; + /* border: 1px solid #4EAF47; */ position: relative; } diff --git a/src/components/Blockly/BlocklyComponent.jsx b/src/components/Blockly/BlocklyComponent.jsx index 50d8578..9d5696e 100644 --- a/src/components/Blockly/BlocklyComponent.jsx +++ b/src/components/Blockly/BlocklyComponent.jsx @@ -29,6 +29,8 @@ import locale from 'blockly/msg/en'; import 'blockly/blocks'; import Toolbox from './toolbox/Toolbox'; +import { Card } from '@material-ui/core'; + Blockly.setLocale(locale); @@ -66,7 +68,7 @@ class BlocklyComponent extends React.Component { return -
+ ; } diff --git a/src/components/CodeViewer.js b/src/components/CodeViewer.js index 0a62b12..aab9167 100644 --- a/src/components/CodeViewer.js +++ b/src/components/CodeViewer.js @@ -11,6 +11,8 @@ import { withStyles } from '@material-ui/core/styles'; import MuiAccordion from '@material-ui/core/Accordion'; import MuiAccordionSummary from '@material-ui/core/AccordionSummary'; import MuiAccordionDetails from '@material-ui/core/AccordionDetails'; +import { Card } from '@material-ui/core'; + const Accordion = withStyles((theme) => ({ root: { @@ -73,7 +75,7 @@ class CodeViewer extends Component { var curlyBrackets = '{ }'; var unequal = '<>'; return ( -
+ -
+
); }; } diff --git a/src/components/WorkspaceStats.js b/src/components/WorkspaceStats.js index 2317d79..098e02d 100644 --- a/src/components/WorkspaceStats.js +++ b/src/components/WorkspaceStats.js @@ -6,6 +6,8 @@ import * as Blockly from 'blockly/core'; import { withStyles } from '@material-ui/core/styles'; import Tooltip from '@material-ui/core/Tooltip'; +import Chip from '@material-ui/core/Chip'; +import Avatar from '@material-ui/core/Avatar'; import Typography from '@material-ui/core/Typography'; import { faPuzzlePiece, faTrash, faPlus, faPen, faArrowsAlt } from "@fortawesome/free-solid-svg-icons"; @@ -17,7 +19,7 @@ const styles = (theme) => ({ display: 'inline', marginLeft: '50px', padding: '3px 10px', - borderRadius: '25%' + // borderRadius: '25%' } }); @@ -27,44 +29,57 @@ class WorkspaceStats extends Component { const workspace = Blockly.getMainWorkspace(); const remainingBlocksInfinity = workspace ? workspace.remainingCapacity() !== Infinity : null; return ( -
- -
- - {workspace ? workspace.getAllBlocks().length : 0} -
+
+ + } + label={workspace ? workspace.getAllBlocks().length : 0}> + - -
- - - {this.props.create} -
+ + } + label={this.props.create}> + - -
- - - {this.props.change} -
+ + } + label={this.props.change}> + - -
- - - {this.props.move} -
+ + } + label={this.props.move}> + - -
- - - {this.props.delete} -
+ + } + label={this.props.delete}> + {remainingBlocksInfinity ? - - {workspace.remainingCapacity()} verbleibende Blöcke + + + : null}
);