add io blocks
This commit is contained in:
@@ -27,6 +27,7 @@ import './BlocklyComponent.css';
|
||||
import Blockly from 'blockly/core';
|
||||
//import locale from 'blockly/msg/en';
|
||||
import 'blockly/blocks';
|
||||
import Toolbox from './toolbox/Toolbox';
|
||||
|
||||
//Blockly.setLocale(locale);
|
||||
|
||||
@@ -61,13 +62,11 @@ class BlocklyComponent extends React.Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
const { children } = this.props;
|
||||
|
||||
|
||||
return <React.Fragment>
|
||||
<div ref={this.blocklyDiv} id="blocklyDiv" />
|
||||
<xml xmlns="https://developers.google.com/blockly/xml" is="blockly" style={{ display: 'none' }} ref={this.toolbox}>
|
||||
{children}
|
||||
</xml>
|
||||
<Toolbox toolbox={this.toolbox} />
|
||||
</React.Fragment>;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user